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:53 UTC
svn commit: rev 65580 - in lenya/trunk/src/webapp/lenya: resources/javascript xslt/info
Author: gregor
Date: Sat Nov 13 19:31:53 2004
New Revision: 65580
Modified:
lenya/trunk/src/webapp/lenya/resources/javascript/tree.js
lenya/trunk/src/webapp/lenya/xslt/info/root.xsl
Log:
move js to includes to avoid problems with XML and &&
Modified: lenya/trunk/src/webapp/lenya/resources/javascript/tree.js
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/javascript/tree.js (original)
+++ lenya/trunk/src/webapp/lenya/resources/javascript/tree.js Sat Nov 13 19:31:53 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,36 @@
SetCookie('highlightedTreeviewLink', '')
}
}
+
+// 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;
+ }
+}
Modified: lenya/trunk/src/webapp/lenya/xslt/info/root.xsl
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/info/root.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/info/root.xsl Sat Nov 13 19:31:53 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