You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by gr...@apache.org on 2004/11/14 04:31:48 UTC

svn commit: rev 65579 - in lenya/branches/BRANCH_1_2_X/src/webapp/lenya: resources/javascript xslt/info

Author: gregor
Date: Sat Nov 13 19:31:47 2004
New Revision: 65579

Modified:
   lenya/branches/BRANCH_1_2_X/src/webapp/lenya/resources/javascript/tree.js
   lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl
Log:
move js to includes to avoid problems with XML and &&

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/resources/javascript/tree.js
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/resources/javascript/tree.js	(original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/resources/javascript/tree.js	Sat Nov 13 19:31:47 2004
@@ -13,7 +13,7 @@
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
-// $Id: tree.js,v 1.14 2004/03/29 07:20:04 egli Exp $
+// $Id$
 //**************************************************************** 
 // TreeView by Marcelino Martins http://www.treeview.net
 //**************************************************************** 
@@ -1144,4 +1144,35 @@
       SetCookie('highlightedTreeviewLink', '')
   }
 } 
- 
\ No newline at end of file
+
+// Load a page as if a node on the tree was clicked (synchronize frames)
+// (Highlights selection if highlight is available.)
+function loadSynchPage(srclink) 
+{
+        var docObj;
+        var linkID;
+        linkID = findIDbyLink(srclink);
+        docObj = findObj(linkID);
+        docObj.forceOpeningOfAncestorFolders();
+        clickOnLink(linkID,docObj.srclink,'basefrm');
+        
+  //Scroll the tree window to show the selected node
+  //Other code in these functions needs to be changed to work with
+  //frameless pages, but this code should, I think, simply be removed
+  //document.body.scrollTop = docObj.navObj.offsetTop
+}
+
+function findIDbyLink(srclink)
+{
+  var i=0;
+  
+  for (i = 0; i < nEntries && (indexOfEntries[i].link == undefined || indexOfEntries[i].link.split('?')[0] != srclink) && (indexOfEntries[i].hreference == undefined || indexOfEntries[i].hreference.split('?')[0] != srclink); i++) {
+  }
+  //FIXME: extend to allow for mapping of index.html to index_defaultlanguage.html
+  if (i >= nEntries) {
+     return 1; //example: node removed in DB
+  }
+  else {
+    return i;
+  }
+} 
\ No newline at end of file

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl	(original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/info/root.xsl	Sat Nov 13 19:31:47 2004
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<!-- $Id: root.xsl,v 1.34 2004/04/29 09:38:22 gregor Exp $ -->
+<!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -45,44 +45,6 @@
         <script src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/ua.js"/>
         <script src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/tree.js"/>
         <script src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/sitetree.js?language={$chosenlanguage}"/>
-        <script language="JavaScript">// Load a page as if a node on the tree was clicked (synchronize frames)
-// (Highlights selection if highlight is available.)
-function loadSynchPage(srclink) 
-{
-        var docObj;
-        var linkID;
-        linkID = findIDbyLink(srclink);
-        docObj = findObj(linkID);
-        docObj.forceOpeningOfAncestorFolders();
-        clickOnLink(linkID,docObj.srclink,'basefrm');
-        
-  //Scroll the tree window to show the selected node
-  //Other code in these functions needs to be changed to work with
-  //frameless pages, but this code should, I think, simply be removed
-  //document.body.scrollTop = docObj.navObj.offsetTop
-}
-
-function findIDbyLink(srclink)
-{
-<![CDATA[
-  var i=0;
-  
-  for (i = 0; i < nEntries &&
-      (indexOfEntries[i].link == undefined || indexOfEntries[i].link.split('?')[0] != srclink) &&
-      (indexOfEntries[i].hreference == undefined || indexOfEntries[i].hreference.split('?')[0] != srclink)
-      ;
-      i++) {
-  }
-  //FIXME: extend to allow for mapping of index.html to index_defaultlanguage.html
-  if (i >= nEntries) {
-     return 1; //example: node removed in DB
-  }
-  else {
-    return i;
-  }
-]]>
-}
-        </script>
       </head>
 
       <body>

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org