[Tynstep-svn] r241 - in trunk/step: step-core step-web/src/main/webapp/css step-web/src/main/webapp/js

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Tue Apr 17 12:04:39 MST 2012


Author: ChrisBurrell
Date: 2012-04-17 12:04:39 -0700 (Tue, 17 Apr 2012)
New Revision: 241

Added:
   trunk/step/step-core/db-drop.sql
Modified:
   trunk/step/step-web/src/main/webapp/css/initial-layout.css
   trunk/step/step-web/src/main/webapp/js/init.js
   trunk/step/step-web/src/main/webapp/js/interlinear_popup.js
Log:
Fixing TYNSTEP-78

Added: trunk/step/step-core/db-drop.sql
===================================================================
--- trunk/step/step-core/db-drop.sql	                        (rev 0)
+++ trunk/step/step-core/db-drop.sql	2012-04-17 19:04:39 UTC (rev 241)
@@ -0,0 +1,44 @@
+SET REFERENTIAL_INTEGRITY FALSE;
+
+drop table if exists bookmark;
+
+drop table if exists geo_place;
+
+drop table if exists history;
+
+drop table if exists hot_spot;
+
+drop table if exists relational_person;
+
+drop table if exists scripture_reference;
+
+drop table if exists session;
+
+drop table if exists timeband;
+
+drop table if exists timeline_event;
+
+drop table if exists users;
+
+SET REFERENTIAL_INTEGRITY TRUE;
+
+drop sequence if exists bookmark_seq;
+
+drop sequence if exists geo_place_seq;
+
+drop sequence if exists history_seq;
+
+drop sequence if exists hot_spot_seq;
+
+drop sequence if exists relational_person_seq;
+
+drop sequence if exists scripture_reference_seq;
+
+drop sequence if exists session_seq;
+
+drop sequence if exists timeband_seq;
+
+drop sequence if exists timeline_event_seq;
+
+drop sequence if exists users_seq;
+

Modified: trunk/step/step-web/src/main/webapp/css/initial-layout.css
===================================================================
--- trunk/step/step-web/src/main/webapp/css/initial-layout.css	2012-04-17 17:13:53 UTC (rev 240)
+++ trunk/step/step-web/src/main/webapp/css/initial-layout.css	2012-04-17 19:04:39 UTC (rev 241)
@@ -184,15 +184,15 @@
 	font-weight: bold;	
 }
 
-.strongs {
+.strongsFeature {
 	background-color: blue;
 }
 
-.interlinear {
+.interlinearFeature {
 	background-color: orange;
 }
 	
-.morphology {
+.morphologyFeature {
 	background-color: red;
 }
 

Modified: trunk/step/step-web/src/main/webapp/js/init.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/init.js	2012-04-17 17:13:53 UTC (rev 240)
+++ trunk/step/step-web/src/main/webapp/js/init.js	2012-04-17 19:04:39 UTC (rev 241)
@@ -149,18 +149,18 @@
 	
 	$.getJSON(BIBLE_GET_BIBLE_VERSIONS, function(data) {
 		var parsedResponse = $.map(data, function(item) {
-			var showingText = item.initials + "] " + item.name;
+			var showingText = "[" + item.initials + "] " + item.name;
 			var features = "";
 			
 			//add to strongs if applicable
 			if(item.hasStrongs) {
-				features += " " + "<span class='versionFeature strongs' title='Supports Strongs concordance'>S</span>";
-				features += " " + "<span class='versionFeature interlinear' title='Supports interlinear feature'>I</span>";
+				features += " " + "<span class='versionFeature strongsFeature' title='Supports Strongs concordance'>S</span>";
+				features += " " + "<span class='versionFeature interlinearFeature' title='Supports interlinear feature'>I</span>";
 				strongedVersions[ii++] = { label: showingText, value: item.initials};
 			}
 			
 			if(item.hasMorphology) {
-				features += " " + "<span class='versionFeature morphology' title='Supports morphology feature'>M</span>";
+				features += " " + "<span class='versionFeature morphologyFeature' title='Supports morphology feature'>M</span>";
 			}
 			
 			//return response for dropdowns

Modified: trunk/step/step-web/src/main/webapp/js/interlinear_popup.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/interlinear_popup.js	2012-04-17 17:13:53 UTC (rev 240)
+++ trunk/step/step-web/src/main/webapp/js/interlinear_popup.js	2012-04-17 19:04:39 UTC (rev 241)
@@ -76,7 +76,7 @@
  */
 InterlinearPopup.prototype.addHandlersToCheckboxes = function() {
 	var self = this;
-	$("input", this.interlinearPopup).not("#il_all").change(function() {
+	$("input:checkbox", this.interlinearPopup).not("#il_all").change(function() {
 		var currentText = $(".interlinearVersions", self.interlinearPopup).val();
 		var itemValue = this.value;
 		
@@ -92,6 +92,13 @@
 		}
 		$(".interlinearVersions", self.interlinearPopup).val(currentText);
 	});
+	
+	
+	$(".interlinearVersions", self.interlinearPopup).keypress(function(event) {
+		if ( event.which == 13 ) {
+			self.updateInterlinear();
+		}
+	});
 }
 
 /**
@@ -120,21 +127,31 @@
 	$(this.interlinearPopup).hear("interlinear-menu-option-triggered-" + this.passageId, function(selfElement, passageId) {
 		selfElement.dialog({
 			buttons : { "OK" : function() {
-							//we check that we have selected some options and alert the menu if so
-							if($("input:checked", self.interlinearPopup).length) {
-								$.shout("pane-menu-internal-state-changed-" + self.passageId, { name: "INTERLINEAR", selected: true });
-							} else {
-								$.shout("pane-menu-internal-state-changed-" + self.passageId, { name: "INTERLINEAR", selected: false });
-							}
-							$(selfElement).dialog("close");
-							
-							//not always true but almost always (since we might still have the same options as before)
-							$.shout("toolbar-menu-options-changed-" + self.passageId);
-						},
-			},
+									self.updateInterlinear();
+								}
+					   },
 			modal: true,
 			width: DEFAULT_POPUP_WIDTH,
 			title: "Please choose one or more versions for the interlinear"
 		});
 	});
-}
+};
+
+
+InterlinearPopup.prototype.updateInterlinear = function() {
+	var self = this;
+	
+	//we check that we have selected some options and alert the menu if so
+	if($("input:checked", self.interlinearPopup).length) {
+		$.shout("pane-menu-internal-state-changed-" + self.passageId, { name: "INTERLINEAR", selected: true });
+	} else {
+		$.shout("pane-menu-internal-state-changed-" + self.passageId, { name: "INTERLINEAR", selected: false });
+	}
+	
+	this.interlinearPopup.dialog("close");
+	
+	//not always true but almost always (since we might still have the same options as before)
+	$.shout("toolbar-menu-options-changed-" + self.passageId);
+
+};
+




More information about the Tynstep-svn mailing list