[sword-cvs] swordweb init.jsp,1.14,1.15 passagestudy.jsp,1.33,1.34 preferences.jsp,1.11,1.12
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 25 Nov 2003 15:28:45 -0700
Update of /usr/local/cvsroot/swordweb
In directory www:/tmp/cvs-serv31702
Modified Files:
init.jsp passagestudy.jsp preferences.jsp
Log Message:
Added option to toggle headings
Index: init.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/init.jsp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- init.jsp 22 Nov 2003 05:57:19 -0000 1.14
+++ init.jsp 25 Nov 2003 22:28:43 -0000 1.15
@@ -130,6 +130,16 @@
response.addCookie(c);
}
+ String headings = (String)request.getParameter("Headings");
+ if (headings == null)
+ headings = (String)session.getAttribute("Headings");
+ else { // set style cookie
+ Cookie c = new Cookie("Headings", headings);
+ c.setMaxAge(java.lang.Integer.MAX_VALUE);
+ c.setPath("/");
+ response.addCookie(c);
+ }
+
Vector showTabs = (Vector)session.getAttribute("showTabs");
if (showTabs == null) {
showTabs = new Vector();
@@ -184,6 +194,9 @@
else if (cookies[i].getName().equals("PrefStyle")) {
prefStyle = cookies[i].getValue();
}
+ else if (cookies[i].getName().equals("Headings")) {
+ headings = cookies[i].getValue();
+ }
else if (cookies[i].getName().equals("PrefBibles")) {
prefBibles = new Vector();
start = 0;
@@ -240,6 +253,7 @@
session.setAttribute("PrefCommentaries", prefCommentaries);
session.setAttribute("ParDispModules", parDispModules);
session.setAttribute("PrefStyle", prefStyle);
+ session.setAttribute("Headings", headings);
session.setAttribute("showTabs", showTabs);
/*
// kept around in case we ever need it again
Index: passagestudy.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/passagestudy.jsp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- passagestudy.jsp 24 Nov 2003 10:03:19 -0000 1.33
+++ passagestudy.jsp 25 Nov 2003 22:28:43 -0000 1.34
@@ -32,7 +32,7 @@
String showStrong = request.getParameter("showStrong");
String showMorph = request.getParameter("showMorph");
- mgr.setGlobalOption("Headings", "On");
+ mgr.setGlobalOption("Headings", ("Off".equalsIgnoreCase(headings)) ? "Off":"On");
for (int i = 0; i < 2; i++) {
String []nodes = request.getParameterValues((i>0)?"close":"open");
@@ -231,9 +231,9 @@
%>
<div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
<%
- String[] headings = activeModule.getEntryAttribute("Heading", "Preverse", "0");
- if (headings.length > 0)
- out.print("<h3>" + headings[0] + "</h3>");
+ String[] heads = activeModule.getEntryAttribute("Heading", "Preverse", "0");
+ if (heads.length > 0)
+ out.print("<h3>" + heads[0] + "</h3>");
%>
<span class="versenum"><a <%= (curVerse == anchorVerse)?"id=\"cv\"":"" %> href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText)+"#cv" %>">
<%= keyText.substring(keyText.indexOf(":")+1) %></a>
Index: preferences.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/preferences.jsp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- preferences.jsp 18 Nov 2003 07:03:05 -0000 1.11
+++ preferences.jsp 25 Nov 2003 22:28:43 -0000 1.12
@@ -151,6 +151,10 @@
<li><a href="preferences.jsp?<%=(visible)?"hide":"show"%>Tab=<%= Integer.toString(i)%>" title="<%= ((visible)?"Hide ":"Show ") + n %> Tab"><%= ((visible)?"Hide ":"Show ") + n %> Tab</a></li>
<% }} %>
</ul>
+ <h2 id="misc">Misc Options</h2>
+ <ul>
+ <li><a id="headings" href="preferences.jsp?Headings=<%= "Off".equalsIgnoreCase(headings)?"On":"Off" %>#misc" title=<%= "Off".equalsIgnoreCase(headings)?"Show":"Hide" %> Headings in Bibles"><%= "Off".equalsIgnoreCase(headings)?"Show":"Hide" %> Headings in Bibles</a></li>
+ </ul>
</div>
</tiles:put>