[sword-cvs] swordweb blues.css,1.2,1.3 init.jsp,1.1.1.1,1.2 parallelstudy.jsp,1.1.1.1,1.2 passagestudy.jsp,1.1.1.1,1.2

sword@www.crosswire.org sword@www.crosswire.org
Fri, 23 May 2003 11:14:44 -0700


Update of /usr/local/cvsroot/swordweb
In directory www:/tmp/cvs-serv5655

Modified Files:
	blues.css init.jsp parallelstudy.jsp passagestudy.jsp 
Log Message:
small rearrangements; parallelstudy enhancements to use tables

Index: blues.css
===================================================================
RCS file: /usr/local/cvsroot/swordweb/blues.css,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** blues.css	22 May 2003 22:50:36 -0000	1.2
--- blues.css	23 May 2003 18:14:41 -0000	1.3
***************
*** 204,213 ****
  }
  
! #content-main div.verse {
  	margin: 0px 0px 5px 0px;
  	padding: 0px 5px 0px 5px;
  }
  
! #content-main div.currentverse {
  	margin: 0px 0px 5px 0px;
  	background-color: #eeeeee;
--- 204,213 ----
  }
  
! #content-main .verse {
  	margin: 0px 0px 5px 0px;
  	padding: 0px 5px 0px 5px;
  }
  
! #content-main .currentverse {
  	margin: 0px 0px 5px 0px;
  	background-color: #eeeeee;
***************
*** 219,222 ****
--- 219,228 ----
  	margin: 0px 0px 5px 0px;
  }
+ 
+ #content-main *[dir=rtl] {
+ 	font-family:code2000,code2001,arial unicode ms,arial, sans serif;
+ 	font-size:larger;
+ }
+ 
  
  /* footer section ---------- */

Index: init.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/init.jsp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** init.jsp	22 May 2003 21:00:19 -0000	1.1.1.1
--- init.jsp	23 May 2003 18:14:41 -0000	1.2
***************
*** 57,60 ****
--- 57,73 ----
  				}
  			}
+ 			else if (cookies[i].getName().equals("ParDispModules")) {
+ 				parDispModules = new Vector();
+ 				start = 0;
+ 				end = 1;
+ 				line = cookies[i].getValue();
+ 				while (end > 0) {
+ 					end = line.indexOf("+",start);
+ 					field = (end > 0) ? line.substring(start, end) : line.substring(start);
+ 					if (start > 3)  		// skip the first one cuz it's not a real module
+ 						parDispModules.add(field);
+ 					start = end + 1;
+ 				}
+ 			}
  		}
  	}

Index: parallelstudy.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/parallelstudy.jsp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** parallelstudy.jsp	22 May 2003 21:00:19 -0000	1.1.1.1
--- parallelstudy.jsp	23 May 2003 18:14:41 -0000	1.2
***************
*** 1,3 ****
! <%@ include file="defines/defines.jsp" %>
  
  <%
--- 1,3 ----
! <%@ include file="defines/tiles.jsp" %>
  
  <%
***************
*** 12,22 ****
  
  	String delModule = (String)request.getParameter("del");
! 	if (delModule != null) {
  		parDispModules.remove(delModule);
  	}
  
- 
  	if (parDispModules.size() == 0) {
! 		parDispModules.add(0, "KJV");
  	}
  
--- 12,21 ----
  
  	String delModule = (String)request.getParameter("del");
! 	if ( (delModule != null) && parDispModules.contains(delModule)) {
  		parDispModules.remove(delModule);
  	}
  
  	if (parDispModules.size() == 0) {
! 		parDispModules.add(0, "KJV"); //our standard, fallback module
  	}
  
***************
*** 28,32 ****
  	String activeKey = (String) session.getAttribute("ActiveKey");
  	if (activeKey == null)
! 		activeKey = "jas 1:19";
  %>
  
--- 27,31 ----
  	String activeKey = (String) session.getAttribute("ActiveKey");
  	if (activeKey == null)
! 		activeKey = "jas 1:19"; // our fallback key
  %>
  
***************
*** 38,42 ****
  	<tiles:put name="title" value="Parallel Bible study" />
  	<tiles:put name="sidebar_left" type="string">
! 	      	<h2>Translations:</h2>
  		<p class="textname">Displayed modules (click to remove)</p>
  		<ul>
--- 37,41 ----
  	<tiles:put name="title" value="Parallel Bible study" />
  	<tiles:put name="sidebar_left" type="string">
! 		<h2>Translations:</h2>
  		<p class="textname">Displayed modules (click to remove)</p>
  		<ul>
***************
*** 47,52 ****
  				if (module != null && module.getType().equals(SwordOrb.BIBLES)) {
  		%>
! 
! 					<li><a href="parallelstudy.jsp?del=<%= URLEncoder.encode(module.getName()) %>" title="Remove from displayed modules"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
  		<%
  				}
--- 46,54 ----
  				if (module != null && module.getType().equals(SwordOrb.BIBLES)) {
  		%>
! 					<li>
! 						<a href="parallelstudy.jsp?del=<%= URLEncoder.encode(module.getName()) %>" title="Remove from displayed modules">
! 							<%= module.getDescription().replaceAll("&", "&amp;") %>
! 						</a>
! 					</li>
  		<%
  				}
***************
*** 69,73 ****
  
  		%>
! 				<li><a href="parallelstudy.jsp?add=<%= URLEncoder.encode(modInfo[i].name) %>" title="Add to displayed modules"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
  		<%
  				}
--- 71,79 ----
  
  		%>
! 				<li>
! 					<a href="parallelstudy.jsp?add=<%= URLEncoder.encode(modInfo[i].name) %>" title="Add to displayed modules">
! 						<%= module.getDescription().replaceAll("&", "&amp;") %>
! 					</a>
! 				</li>
  		<%
  				}
***************
*** 87,91 ****
  				if (module != null && module.getType().equals(SwordOrb.COMMENTARIES)) {
  		%>
! 				<li><a href="parallelstudy.jsp?del=<%= URLEncoder.encode(module.getName()) %>" title="Remove from displayed modules"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
  		<%
  				}
--- 93,101 ----
  				if (module != null && module.getType().equals(SwordOrb.COMMENTARIES)) {
  		%>
! 				<li>
! 					<a href="parallelstudy.jsp?del=<%= URLEncoder.encode(module.getName()) %>" title="Remove from displayed modules">
! 						<%= module.getDescription().replaceAll("&", "&amp;") %>
! 					</a>
! 				</li>
  		<%
  				}
***************
*** 106,110 ****
  					}
  		%>
! 				<li><a href="parallelstudy.jsp?add=<%= URLEncoder.encode(modInfo[i].name) %>" title="Add to displaued modules"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
  		<%
  				}
--- 116,124 ----
  					}
  		%>
! 				<li>
! 					<a href="parallelstudy.jsp?add=<%= URLEncoder.encode(modInfo[i].name) %>" title="Add to displaued modules">
! 						<%= module.getDescription().replaceAll("&", "&amp;") %>
! 					</a>
! 				</li>
  		<%
  				}
***************
*** 134,149 ****
  			{
  		%>
! 			<div style="clear:both;float:left;display:table-row;width:100%;"">
  		<% //insert module names at the top
  				for (int i = 0; i < parDispModules.size(); i++) {
  					SWModule mod = mgr.getModuleByName((String)parDispModules.get(i));
  		%>
! 					<div style="padding:3px; float:left; text-align:left; display:table-cell; width:<%= 100/parDispModules.size() %>%;">
! 					<b><%= mod.getDescription() %></b>
! 					</div>
  		<%
  				}
  		%>
! 			</div>
  		<%
  				String chapterPrefix = activeKey.substring(0, activeKey.indexOf(":"));
--- 148,174 ----
  			{
  		%>
! 
! 		<%-- table which contains all verse items --%>
! 		<table width="100%" cellspacing="0" border="0" cellpadding="0" align="center">
! 
! 		<thead>
! 		<tr>
! 
  		<% //insert module names at the top
+ 				int colWidth = 100 / parDispModules.size();
+ 
  				for (int i = 0; i < parDispModules.size(); i++) {
  					SWModule mod = mgr.getModuleByName((String)parDispModules.get(i));
  		%>
! 					<td>
! 						<b><%= mod.getDescription() %></b>
! 					</td>
  		<%
  				}
  		%>
! 		</tr>
! 		</thead>
! 
! 		<tbody>
  		<%
  				String chapterPrefix = activeKey.substring(0, activeKey.indexOf(":"));
***************
*** 154,158 ****
  
  		%>
! 					<div style="clear:both;float:left;display:table-row;width:100%;">
  		<%
  					for (int i = 0; i < parDispModules.size(); i++) {
--- 179,183 ----
  
  		%>
! 					<tr align="left" valign="top">
  		<%
  					for (int i = 0; i < parDispModules.size(); i++) {
***************
*** 162,184 ****
  						boolean rtol = ("RtoL".equalsIgnoreCase(mod.getConfigEntry("Direction")));
  		%>
! 						<div style="float:left;display:table-cell;padding:3px;width:<%= 100/parDispModules.size() %>%; <%= i<parDispModules.size() ? "padding-right:10px;" : ""%>" dir="<%= rtol ? "rtl" : "ltr" %>" class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
! 						<span class="versenum">
! 							<a href="parallelstudy.jsp?key=<%= URLEncoder.encode(keyText) %>">
! 								<%= keyText.substring(keyText.indexOf(":")+1) %>
! 							</a>
! 						</span>
! 
! 							<%= new String(mod.getRenderText().getBytes("iso-8859-1"), "UTF-8") %>
! 						</div>
  
  		<%
  					}
  		%>
! 
! 					</div>
! 			<%
  				}
  			}
! 			%>
  	</tiles:put>
! </tiles:insert>
\ No newline at end of file
--- 187,212 ----
  						boolean rtol = ("RtoL".equalsIgnoreCase(mod.getConfigEntry("Direction")));
  		%>
! 							<td style="padding:4px;" align="<%= rtol ? "right" : "left" %>" width="<%= colWidth %>%" class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
! 								<div dir="<%= rtol ? "rtl" : "ltr" %>">
! 									<span class="versenum">
! 										<a href="parallelstudy.jsp?key=<%= URLEncoder.encode(keyText) %>">
! 											<%= keyText.substring(keyText.indexOf(":")+1) %>
! 									</a>
! 									</span>
  
+ 									<%= new String(mod.getRenderText().getBytes("iso-8859-1"), "UTF-8") %>
+ 								</div>
+ 							</td>
  		<%
  					}
  		%>
! 				</tr>
! 		<%
  				}
  			}
! 		%>
! 
! 		</tbody>
! 		</table>
  	</tiles:put>
! </tiles:insert>

Index: passagestudy.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/passagestudy.jsp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** passagestudy.jsp	22 May 2003 21:00:19 -0000	1.1.1.1
--- passagestudy.jsp	23 May 2003 18:14:41 -0000	1.2
***************
*** 89,101 ****
  					boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
  			%>
! 				<div class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
! 		<%			if (!rtol) {	%>
! 				<span class="versenum"><a href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText) %>"><%= keyText.substring(keyText.indexOf(":")+1) %></a></span>
! 		<%			}	%>
  
! 					<%= new String(activeModule.getRenderText().getBytes(), "UTF-8") %>
! 		<%			if (rtol) {	%>
! 				<span class="versenum"><a href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText) %>"><%= keyText.substring(keyText.indexOf(":")+1) %></a></span>
! 		<%			}	%>
  				</div>
  			<%
--- 89,98 ----
  					boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
  			%>
! 				<div dir="<%= rtol ? "rtl" : "ltr" %>" class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
! 					<span class="versenum"><a href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText) %>">
! 						<%= keyText.substring(keyText.indexOf(":")+1) %></a>
! 					</span>
  
! 					<%= new String(activeModule.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
  				</div>
  			<%
***************
*** 106,110 ****
  				<div class="verse">
  				<span class="versenum"><%= activeKey %></span>
! 					<%= new String(activeModule.getRenderText().getBytes(), "UTF-8") %>
  				</div>
  		<%
--- 103,107 ----
  				<div class="verse">
  				<span class="versenum"><%= activeKey %></span>
! 					<%= new String(activeModule.getRenderText().getBytes("iso8859-1"), "UTF-8") %>
  				</div>
  		<%