[sword-svn] r320 - in trunk/webapp: . layouts
scribe at www.crosswire.org
scribe at www.crosswire.org
Fri Oct 31 03:21:14 MST 2008
Author: scribe
Date: 2008-10-31 03:21:13 -0700 (Fri, 31 Oct 2008)
New Revision: 320
Modified:
trunk/webapp/bookdisplay.jsp
trunk/webapp/init.jsp
trunk/webapp/layouts/base-layout.jsp
Log:
fixed current entry highlight in tree display
added dir class to body for rtol support (thanks refdoc)
Modified: trunk/webapp/bookdisplay.jsp
===================================================================
--- trunk/webapp/bookdisplay.jsp 2008-10-31 08:52:46 UTC (rev 319)
+++ trunk/webapp/bookdisplay.jsp 2008-10-31 10:21:13 UTC (rev 320)
@@ -233,6 +233,11 @@
int max = 400;
module.setKeyText(rootTreeKey);
rootTreeKey = module.getKeyText();
+ String currentKey = target;
+ if ("2".equals(module.getConfigEntry("DisplayLevel"))) {
+ int offset = currentKey.lastIndexOf("/");
+ if (offset > 0) currentKey = currentKey.substring(0, offset);
+ }
int offset = rootTreeKey.lastIndexOf("/");
String[] children = module.getKeyChildren();
@@ -254,7 +259,7 @@
if (rootTreeKey.length()>0) {
String localName = rootTreeKey.substring(offset+1);
String linkRef = rootTreeKey;
- if (target.equals(rootTreeKey))
+ if (currentKey.equals(rootTreeKey))
out.print("<li id=\"current\">"); //the current entry in the navigation tree
else
out.print("<li>");
Modified: trunk/webapp/init.jsp
===================================================================
--- trunk/webapp/init.jsp 2008-10-31 08:52:46 UTC (rev 319)
+++ trunk/webapp/init.jsp 2008-10-31 10:21:13 UTC (rev 320)
@@ -23,6 +23,7 @@
static Vector tabLinks = null;
static Vector tabTitles = null;
static Vector tabDefaults = null;
+ static Vector rtolLangs = null;
static String defaultBible = null;
static String defaultLang = null;
static String defaultStyle = null;
@@ -99,6 +100,9 @@
tabTitles.add("Frequently Asked Questions");
tabLinks.add("about.jsp");
tabDefaults.add("true");
+
+ rtolLangs = new Vector();
+ rtolLangs.add("fa");
}
}
@@ -353,6 +357,7 @@
session.setAttribute("tabs", tabs);
session.setAttribute("styleNames", styleNames);
session.setAttribute("styleFiles", styleFiles);
+ session.setAttribute("rtolLangs", rtolLangs);
}
%>
Modified: trunk/webapp/layouts/base-layout.jsp
===================================================================
--- trunk/webapp/layouts/base-layout.jsp 2008-10-31 08:52:46 UTC (rev 319)
+++ trunk/webapp/layouts/base-layout.jsp 2008-10-31 10:21:13 UTC (rev 320)
@@ -6,6 +6,8 @@
<%
String lang = (String)session.getAttribute("lang");
if (lang == null) lang = "en-US";
+ Vector rtolLangs = (Vector)session.getAttribute("rtolLangs");
+ String dir = rtolLangs.contains(lang) ? "rtol" : "ltor";
String prefStyle = (String)session.getAttribute("PrefStyle");
Vector styleNames = (Vector)session.getAttribute("styleNames");
Vector styleFiles = (Vector)session.getAttribute("styleFiles");
@@ -39,7 +41,7 @@
<script type="text/javascript" src="swordweb.js"></script>
</head>
- <body onload="onPageLoad();">
+ <body onload="onPageLoad();" class="<%= dir %>">
<%-- include header --%>
<tiles:insert attribute="header" />
<tiles:insert attribute="pintro" />
More information about the sword-cvs
mailing list