[Tynstep-svn] r237 - in trunk/step: step-core/src/main/java/com/tyndalehouse/step/core/service/impl step-core/src/main/resources/com/tyndalehouse/step/core/service/impl step-core/src/test/java/com/tyndalehouse/step/core/service/impl step-web/src/main/webapp step-web/src/main/webapp/css step-web/src/main/webapp/js

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Tue Apr 17 05:07:11 MST 2012


Author: ChrisBurrell
Date: 2012-04-17 05:07:11 -0700 (Tue, 17 Apr 2012)
New Revision: 237

Modified:
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImpl.java
   trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl
   trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl
   trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java
   trunk/step/step-web/src/main/webapp/css/initial-layout.css
   trunk/step/step-web/src/main/webapp/index.html
   trunk/step/step-web/src/main/webapp/js/init.js
   trunk/step/step-web/src/main/webapp/js/lexicon_definition.js
   trunk/step/step-web/src/main/webapp/js/timeline.js
   trunk/step/step-web/src/main/webapp/js/ui_hooks.js
   trunk/step/step-web/src/main/webapp/panemenu.html
Log:


Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImpl.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImpl.java	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImpl.java	2012-04-17 12:07:11 UTC (rev 237)
@@ -30,7 +30,6 @@
 import org.crosswire.jsword.book.FeatureType;
 import org.crosswire.jsword.book.install.InstallException;
 import org.crosswire.jsword.book.install.Installer;
-import org.crosswire.jsword.passage.KeyFactory;
 import org.crosswire.jsword.passage.NoSuchKeyException;
 import org.crosswire.jsword.passage.NoSuchVerseException;
 import org.crosswire.jsword.passage.PassageKeyFactory;
@@ -38,6 +37,7 @@
 import org.crosswire.jsword.passage.RocketPassage;
 import org.crosswire.jsword.passage.Verse;
 import org.crosswire.jsword.passage.VerseRange;
+import org.crosswire.jsword.versification.system.Versifications;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
@@ -345,8 +345,13 @@
         if (isNotBlank(references)) {
             LOGGER.trace("Resolving references for [{}]", references);
             try {
-                final KeyFactory keyFactory = PassageKeyFactory.instance();
-                final RocketPassage rp = (RocketPassage) keyFactory.getKey(references);
+                final PassageKeyFactory keyFactory = PassageKeyFactory.instance();
+
+                // TODO: Should probably base this on the correct versification for the passages, rather than
+                // default to KJV
+
+                final RocketPassage rp = (RocketPassage) keyFactory.getKey(Versifications.instance()
+                        .getVersification(Versifications.DEFAULT_V11N), references);
                 for (int ii = 0; ii < rp.countRanges(RestrictionType.NONE); ii++) {
                     final VerseRange vr = rp.getRangeAt(ii, RestrictionType.NONE);
                     final Verse start = vr.getStart();
@@ -362,6 +367,8 @@
                     // sr.setTarget(target);
                     sr.setStartVerseId(startVerseId);
                     sr.setEndVerseId(endVerseId);
+
+                    // TODO: bug?
                     sr.setTargetType(TargetType.TIMELINE_EVENT);
                     refs.add(sr);
                 }

Modified: trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl
===================================================================
--- trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/default.xsl	2012-04-17 12:07:11 UTC (rev 237)
@@ -90,11 +90,18 @@
   <!-- Whether to output superscript verse numbers or normal size ones -->
   <xsl:param name="TinyVNum" select="'false'"/>
 
+  <!-- The default versification -->
+  <xsl:param name="v11n" select="'KJV'"/>
+
   <!-- The order of display. Hebrew is rtl (right to left) -->
   <xsl:param name="direction" select="'ltr'"/>
 
   <!-- Create a global key factory from which OSIS ids will be generated -->
   <xsl:variable name="keyf" select="jsword:org.crosswire.jsword.passage.PassageKeyFactory.instance()"/>
+  
+  <!--  TODO: support alternate versification -->
+  <xsl:variable name="v11nf" select="jsword:org.crosswire.jsword.versification.system.Versifications.instance()"/>
+
   <!-- Create a global number shaper that can transform 0-9 into other number systems. -->
   <xsl:variable name="shaper" select="jsword:org.crosswire.common.icu.NumberShaper.new()"/>
 
@@ -300,7 +307,8 @@
 
   <xsl:template match="verse" mode="print-notes">
     <xsl:if test=".//note[not(@type) or not(@type = 'x-strongsMarkup')]">
-      <xsl:variable name="passage" select="jsword:getValidKey($keyf, @osisID)"/>
+     <xsl:variable name="versification" select="jsword:getVersification($v11nf, $v11n)"/>
+      <xsl:variable name="passage" select="jsword:getValidKey($keyf, $versification, @osisID)"/>
       <a href="#{substring-before(concat(@osisID, ' '), ' ')}">
         <xsl:value-of select="jsword:getName($passage)"/>
       </a>
@@ -330,8 +338,9 @@
       <xsl:variable name="versenum">
         <xsl:choose>
           <xsl:when test="$BCVNum = 'true'">
-            <xsl:variable name="passage" select="jsword:getValidKey($keyf, @osisID)"/>
-            <xsl:value-of select="jsword:getName($passage)"/>
+		      <xsl:variable name="versification" select="jsword:getVersification($v11nf, $v11n)"/>
+		      <xsl:variable name="passage" select="jsword:getValidKey($keyf, $versification, @osisID)"/>
+              <xsl:value-of select="jsword:getName($passage)"/>
           </xsl:when>
           <xsl:when test="$CVNum = 'true'">
             <xsl:value-of select="concat($chapter, ' : ', $verse)"/>

Modified: trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl
===================================================================
--- trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-core/src/main/resources/com/tyndalehouse/step/core/service/impl/interlinear.xsl	2012-04-17 12:07:11 UTC (rev 237)
@@ -83,6 +83,10 @@
   <!-- Whether to output superscript verse numbers or normal size ones -->
   <xsl:param name="TinyVNum" select="'false'"/>
 
+  <!-- The default versification -->
+  <xsl:param name="v11n" select="'KJV'"/>
+
+
   <!-- The order of display. Hebrew is rtl (right to left) -->
   <xsl:param name="direction" select="'ltr'"/>
 
@@ -94,6 +98,9 @@
   <xsl:param name="interlinearVersion" select="''" />
   <xsl:param name="interlinearReference" select="''" />
 
+  <!--  TODO: support alternate versification -->
+  <xsl:variable name="v11nf" select="jsword:org.crosswire.jsword.versification.system.Versifications.instance()"/>
+
   <!-- Create a global key factory from which OSIS ids will be generated -->
   <xsl:variable name="keyf" select="jsword:org.crosswire.jsword.passage.PassageKeyFactory.instance()"/>
   <!-- Create a global number shaper that can transform 0-9 into other number systems. -->
@@ -305,7 +312,8 @@
 
   <xsl:template match="verse" mode="print-notes">
     <xsl:if test=".//note[not(@type) or not(@type = 'x-strongsMarkup')]">
-      <xsl:variable name="passage" select="jsword:getValidKey($keyf, @osisID)"/>
+     <xsl:variable name="versification" select="jsword:getVersification($v11nf, $v11n)"/>
+      <xsl:variable name="passage" select="jsword:getValidKey($keyf, $versification, @osisID)"/>
       <a href="#{substring-before(concat(@osisID, ' '), ' ')}">
         <xsl:value-of select="jsword:getName($passage)"/>
       </a>
@@ -335,7 +343,8 @@
       <xsl:variable name="versenum">
         <xsl:choose>
           <xsl:when test="$BCVNum = 'true'">
-            <xsl:variable name="passage" select="jsword:getValidKey($keyf, @osisID)"/>
+            <xsl:variable name="versification" select="jsword:getVersification($v11nf, $v11n)"/>
+      		<xsl:variable name="passage" select="jsword:getValidKey($keyf, $versification, @osisID)"/>
             <xsl:value-of select="jsword:getName($passage)"/>
           </xsl:when>
           <xsl:when test="$CVNum = 'true'">

Modified: trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java
===================================================================
--- trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-core/src/test/java/com/tyndalehouse/step/core/service/impl/JSwordServiceImplTest.java	2012-04-17 12:07:11 UTC (rev 237)
@@ -26,7 +26,6 @@
 
 import com.tyndalehouse.step.core.data.entities.ScriptureReference;
 import com.tyndalehouse.step.core.models.LookupOption;
-import com.tyndalehouse.step.core.service.impl.JSwordServiceImpl;
 
 /**
  * a service providing a wrapper around JSword
@@ -109,8 +108,8 @@
         final List<ScriptureReference> refs = jsi.getPassageReferences("Gen.1.1");
 
         assertEquals(refs.size(), 1);
-        assertEquals(1, refs.get(0).getStartVerseId());
-        assertEquals(1, refs.get(0).getEndVerseId());
+        assertEquals(4, refs.get(0).getStartVerseId());
+        assertEquals(4, refs.get(0).getEndVerseId());
     }
 
     /**
@@ -122,10 +121,10 @@
         final List<ScriptureReference> refs = jsi.getPassageReferences("Gen.1.1;Gen.1.3");
 
         assertEquals(2, refs.size());
-        assertEquals(1, refs.get(0).getStartVerseId());
-        assertEquals(1, refs.get(0).getEndVerseId());
-        assertEquals(3, refs.get(1).getStartVerseId());
-        assertEquals(3, refs.get(1).getEndVerseId());
+        assertEquals(4, refs.get(0).getStartVerseId());
+        assertEquals(4, refs.get(0).getEndVerseId());
+        assertEquals(6, refs.get(1).getStartVerseId());
+        assertEquals(6, refs.get(1).getEndVerseId());
     }
 
     /**
@@ -137,10 +136,10 @@
         final List<ScriptureReference> refs = jsi.getPassageReferences("Gen.1.1-2;Gen.1.4-5");
 
         assertEquals(refs.size(), 2);
-        assertEquals(1, refs.get(0).getStartVerseId());
-        assertEquals(2, refs.get(0).getEndVerseId());
-        assertEquals(4, refs.get(1).getStartVerseId());
-        assertEquals(5, refs.get(1).getEndVerseId());
+        assertEquals(4, refs.get(0).getStartVerseId());
+        assertEquals(5, refs.get(0).getEndVerseId());
+        assertEquals(7, refs.get(1).getStartVerseId());
+        assertEquals(8, refs.get(1).getEndVerseId());
     }
 
     /**

Modified: trunk/step/step-web/src/main/webapp/css/initial-layout.css
===================================================================
--- trunk/step/step-web/src/main/webapp/css/initial-layout.css	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/css/initial-layout.css	2012-04-17 12:07:11 UTC (rev 237)
@@ -176,12 +176,60 @@
 #bottomSection { 
 	height: 0px;
 	position: absolute;
-	bottom: 0px;
+	bottom: 5px;
 	left: 0px;
-	width: 100%;
+	width: 99%;
+	border: 1px solid #000; 
+	margin-left: 5px; 
+	margin-right: 5px;
+	display: none;
 }
 
+#bottomSection > div
+{
+	width: 100%; 
+	background-color: #147000; 
+	color: #fff; 
+	text-align: right;
+}
 
+/* Close button */
+#bottomSection > div span
+{
+	cursor: pointer; 
+	margin: 5px;
+}
+
+#bottomSection #leftArrow
+{
+	height: 105px; 
+	width: 20px; 
+	background-color: #fff;
+	border: 1px solid #ccc; 
+	position: absolute; 
+	top: 28px; 
+	left: 0px; 
+	z-index: 9999;
+	font-size: 30px;
+	color: #ccc;
+	padding-top: 70px;
+}
+
+#bottomSection #rightArrow
+{
+	height: 105px; 
+	width: 20px; 
+	background-color: #fff;
+	border: 1px solid #ccc; 
+	position: absolute; 
+	top: 28px; 
+	right: 0px; 
+	z-index: 9999;
+	font-size: 30px;
+	color: #ccc;
+	padding-top: 70px;
+}
+
 .no-left-border {
 	/* border-left: none; */
 	margin-left: -1px; 
@@ -255,8 +303,11 @@
 	width: 100%;
 }
 
+/**************************/
+/* LEXICON DEFINITION
+/**************************/
 #lexiconDefinition {
-	display: inline-block;
+	display: none;
 	z-index: 9999;
 	width: 400px;
 	bottom: 0px;
@@ -264,6 +315,13 @@
 	left: -1000px;
 }
 
+#lexiconPopupClose
+{
+	float: right; 
+	padding-top: 4px; 
+	padding-right: 4px;
+	cursor: pointer;
+}
 /**************************/
 /* LOGIN POPUP
 /**************************/

Modified: trunk/step/step-web/src/main/webapp/index.html
===================================================================
--- trunk/step/step-web/src/main/webapp/index.html	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/index.html	2012-04-17 12:07:11 UTC (rev 237)
@@ -88,8 +88,8 @@
 			    <div class="passageText ui-widget">
 			    	<div class="headingContainer">
 						<a class="bookmarkPassageLink">Add a bookmark</a>
-				    	<input id="leftPassageReference" class="heading editable passageReference" size="30" value="Jhn 1:1" />
-				    	<input id="leftPassageBook" class="heading editable passageVersion" size="5" value="ESV" />
+				    	<input id="rightPassageReference" class="heading editable passageReference" size="30" value="Jhn 1:1" />
+				    	<input id="rightPassageBook" class="heading editable passageVersion" size="5" value="ESV" />
 			    	</div>
 			    	<div class="passageContent"></div>
 				</div>
@@ -97,7 +97,17 @@
 		</div>
 	</div>
 	
-	<div id="bottomSection" class="bottomModule timeline">No modules have yet been loaded.</div>
+	<div id="bottomSection" class="bottomModule timeline">
+		<div style="height: 25px;">
+			<span id="timelineContext" style="float: left;"></span>
+			<span style="float: right;" onclick="hideBottomSection();">Close</span>
+		</div>
+		<div id="leftArrow" onclick="TimelineLeftArrow();" style="cursor: pointer;"><</div>
+		<div id="bottomSectionContent" style="clear: both;">	
+			No modules have yet been loaded.
+		</div>
+		<div id="rightArrow" onclick="TimelineRightArrow();" style="cursor: pointer;">></div>		
+	</div>
 </div>
 
 <div class="interlinearPopup">

Modified: trunk/step/step-web/src/main/webapp/js/init.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/init.js	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/js/init.js	2012-04-17 12:07:11 UTC (rev 237)
@@ -30,7 +30,7 @@
 	var topMenuHeight = $("#topMenu").height();
 	var headingContainerHeight = $(".headingContainer").height();
 	var imageAndFooterHeight = $(".northBookmark").height() + $(".logo").height();
-	var bottomSectionHeight = $("#bottomSection").height();
+	var bottomSectionHeight = $("#bottomSection").height() + 100;
 	var windowWithoutMenuNorModule = windowHeight - topMenuHeight - bottomSectionHeight; 
 	var columnHeight = windowWithoutMenuNorModule;
 	var bookmarkHeight = windowWithoutMenuNorModule - imageAndFooterHeight ;
@@ -263,11 +263,11 @@
 }
 
 /**
- * initialises the modules 
+ * initialises the modules 	
  * @param passages a list of passages that were provided
  */
 function initModules(passages) {
-	var bottomSection = $("#bottomSection");
+	var bottomSection = $("#bottomSectionContent");
 	
 	new TimelineWidget(bottomSection);
 	new GeographyWidget(bottomSection, passages);

Modified: trunk/step/step-web/src/main/webapp/js/lexicon_definition.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/lexicon_definition.js	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/js/lexicon_definition.js	2012-04-17 12:07:11 UTC (rev 237)
@@ -13,13 +13,17 @@
 
 LexiconDefinition.prototype.getPopup = function() {
 	if(this.popup) {
+		this.popup.css('display', 'inline-block');
 		return this.popup;
 	}
 	
 	//create the popup container
-	$("body").append("<span id='lexiconDefinition'><ul></ul></span>");
+	$("body").append("<span id='lexiconDefinition'><ul><span id='lexiconPopupClose'>X</span></ul></span>");
 	this.popup = $("#lexiconDefinition");
 	this.popup.tabs().draggable();
+	$('#lexiconPopupClose').click(function() {
+		$('#lexiconDefinition').hide();
+	});
 	return this.popup;
 }
 

Modified: trunk/step/step-web/src/main/webapp/js/timeline.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/timeline.js	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/js/timeline.js	2012-04-17 12:07:11 UTC (rev 237)
@@ -54,6 +54,8 @@
 	}
 }
 
+var tl2;
+
 TimelineWidget.prototype.onLoad = function() {
     var zones = [];
     this.theme = Timeline.ClassicTheme.create();
@@ -67,7 +69,8 @@
     	var bands = self.getBands(json.events);
 
     	if(!self.tl) {
-    		self.tl = Timeline.create(self.rootElement[0], bands, Timeline.HORIZONTAL);    	
+    		self.tl = Timeline.create(self.rootElement[0], bands, Timeline.HORIZONTAL); 
+    		tl2 = self.tl;
     	}
     	
 //    	bands[0].eventSource.loadJSON(json, TIMELINE_GET_EVENTS_IN_PERIOD +"-101690000000000/-101580000000000");
@@ -87,6 +90,8 @@
     var date = "-1250";
     var zones = [];
     
+    var i = 0;
+    
 	$.each(events, function(index, event) {
 		//TODO this can be optmized, since we are re-creating the uiTimebands every time
 		var hotspot = self.hotspots[event.hotSpotId];
@@ -97,7 +102,7 @@
 			if(obtained[hotspot.timebandId] == null) {
 				obtained[hotspot.timebandId] = true;
 				var bandInfo = Timeline.createBandInfo({
-					width:          "50px", 
+					width:          "180px", 
 					trackGap: 0.2,
 					trackHeight: 0.5,
 					intervalUnit:   unit, 
@@ -110,12 +115,17 @@
 				});
 				
 				bandInfo.stepTimebandId = hotspot.timebandId;
-				uiTimebands.push( bandInfo );
+				
+				if (i == 2)
+				{
+					uiTimebands.push( bandInfo );
+				}
 			}
 		}
+		
+		i++;
 	});
-
-//    alert(uiTimebands);
+	
 	return uiTimebands;
 }
 
@@ -139,8 +149,9 @@
 			
 		    return band.stepTimebandId == hotspot.timebandId;
 		});
-//		alert(eventsOnBand.length);
-		band.eventSource.loadJSON({ dateTimeFormat: json.dateTimeFormat, events: eventsOnBand }, TIMELINE_GET_EVENTS_IN_PERIOD +"-101690000000000/-101580000000000");
+
+		band.eventSource.loadJSON({ dateTimeFormat: json.dateTimeFormat, events: eventsOnBand }, 
+			TIMELINE_GET_EVENTS_IN_PERIOD +"-101690000000000/-101580000000000");
 	});
 	
 };
@@ -177,4 +188,63 @@
             self.tl.layout();
         }, 500);
     }
+}
+
+/* Overriding the fill in bubble from the timeline library. */
+Timeline.DefaultEventSource.Event.prototype.fillInfoBubble = function (elmt, theme, labeller) { 
+	var start = new Date(this.getStart());
+	start = (start.getFullYear() < 0) ? Math.abs(start.getFullYear()) + " BC" : start.getFullYear() + " AD";
+	
+	var end = new Date(this.getEnd());
+	end = (end.getFullYear() < 0) ? Math.abs(end.getFullYear()) + " BC" : end.getFullYear() + " AD";	
+	
+	var doc = elmt.ownerDocument; 
+	var title = this.getText(); 
+	var link = this.getLink(); 
+	var image = this.getImage(); 
+
+	if (image != null) { 
+		var img = doc.createElement("img"); 
+		img.src = image; 
+		theme.event.bubble.imageStyler(img); 
+		elmt.appendChild(img); 
+	} 
+	var divTitle = doc.createElement("div"); 
+	var textTitle = doc.createTextNode(title); 
+	if (link != null) { 
+		var a = doc.createElement("a"); 
+		a.href = link; 
+		a.appendChild(textTitle); 
+		divTitle.appendChild(a); 
+	} else { 
+		divTitle.appendChild(textTitle); 
+	} 
+	theme.event.bubble.titleStyler(divTitle); 
+	elmt.appendChild(divTitle); 
+	var divBody = doc.createElement("div"); 
+	this.fillDescription(divBody); 
+	theme.event.bubble.bodyStyler(divBody); 
+	elmt.appendChild(divBody); 
+	// This is where they define the times in the bubble 
+	var divTime = doc.createElement("div"); 
+	divTime.innerHTML = start + " - " + end; 
+	elmt.appendChild(divTime); 
+	var divWiki = doc.createElement("div"); 
+	this.fillWikiInfo(divWiki); 
+	theme.event.bubble.wikiStyler(divWiki); 
+	elmt.appendChild(divWiki); 
+} 
+
+function TimelineLeftArrow()
+{
+	var band = tl2.getBand(0);
+	var newDate = Timeline.DateTime.parseGregorianDateTime(band.getMinVisibleDate().getFullYear() - 300);
+	band.scrollToCenter(newDate);
+}
+
+function TimelineRightArrow()
+{
+	var band = tl2.getBand(0);
+	var newDate = Timeline.DateTime.parseGregorianDateTime(band.getMaxVisibleDate().getFullYear() + 300);
+	band.scrollToCenter(newDate);
 }
\ No newline at end of file

Modified: trunk/step/step-web/src/main/webapp/js/ui_hooks.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/ui_hooks.js	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/js/ui_hooks.js	2012-04-17 12:07:11 UTC (rev 237)
@@ -125,8 +125,8 @@
 /**
  * Shows the timeline module
  */
-function showTimelineModule() {
-	showBottomSection();
+function showTimelineModule(menuItem) {
+	showBottomSection(menuItem);
 	$.shout("show-timeline");
 };
 
@@ -141,8 +141,35 @@
 /**
  * shows the bottom section
  */
-function showBottomSection() {
+function showBottomSection(menuItem) {
+	if (getPassageId(menuItem) == 0)
+	{
+		var verse = $('#leftPassageReference').val();
+		$('#timelineContext').html(verse);
+	}
+	else
+	{
+		var verse = $('#rightPassageReference').val();
+		$('#timelineContext').html(verse);	
+	}
+
 	var bottomSection = $("#bottomSection");
-	bottomSection.height(bottomSection.parent().parent().height() / 2);
+	var bottomSectionContent = $("#bottomSectionContent");
+	
+	bottomSection.show();
+	bottomSection.height(250);
+	bottomSectionContent.height(225);
+	
 	refreshLayout();
 }
+
+function hideBottomSection() {
+	var bottomSection = $("#bottomSection");
+	var bottomSectionContent = $("#bottomSectionContent");
+
+	bottomSection.hide();
+	bottomSection.height(0);
+	bottomSectionContent.height(0);
+	
+	refreshLayout();
+}

Modified: trunk/step/step-web/src/main/webapp/panemenu.html
===================================================================
--- trunk/step/step-web/src/main/webapp/panemenu.html	2012-03-01 03:26:31 UTC (rev 236)
+++ trunk/step/step-web/src/main/webapp/panemenu.html	2012-04-17 12:07:11 UTC (rev 237)
@@ -10,7 +10,7 @@
 	</li>
 	<li><a href="#">Context</a>
 	<ul>
-		<li><a href="#" onclick="showTimelineModule();">Timeline</a></li>
+		<li><a href="#" onclick="showTimelineModule(this);">Timeline</a></li>
 		<li><a href="#" onclick="showGeographyModule(this);">Maps</a></li>
 	</ul>
 	</li>




More information about the Tynstep-svn mailing list