[Tynstep-svn] r215 - trunk/step/step-web/src/main/webapp/js

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Sun Feb 27 16:10:46 MST 2011


Author: ChrisBurrell
Date: 2011-02-27 16:10:46 -0700 (Sun, 27 Feb 2011)
New Revision: 215

Modified:
   trunk/step/step-web/src/main/webapp/js/init.js
   trunk/step/step-web/src/main/webapp/js/toolbar_menu.js
Log:
committing workaround

Modified: trunk/step/step-web/src/main/webapp/js/init.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/init.js	2011-02-27 22:32:19 UTC (rev 214)
+++ trunk/step/step-web/src/main/webapp/js/init.js	2011-02-27 23:10:46 UTC (rev 215)
@@ -177,10 +177,12 @@
 	// - version-changed-0 and version-changed-1
 	waitingForCondition(
 		function() {
-			return !($._jq_shout.registry["version-changed-0"] === undefined
-		 		|| $._jq_shout.registry["version-changed-1"] === undefined);
+			return !($(".passageContainer[passage-id = '0'] .passageVersion") === undefined
+			    || $(".passageContainer[passage-id = '1'] .passageVersion").val() === undefined);
+			
+//			return !($._jq_shout.registry["version-changed-0"] === undefined
+//		 		|| $._jq_shout.registry["version-changed-1"] === undefined);
 	}, 	function() {
-			
 			$.shout("version-changed-" + 0, $(".passageContainer[passage-id = '0'] .passageVersion").val());
 			$.shout("version-changed-" + 1, $(".passageContainer[passage-id = '1'] .passageVersion").val());
 	});

Modified: trunk/step/step-web/src/main/webapp/js/toolbar_menu.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/toolbar_menu.js	2011-02-27 22:32:19 UTC (rev 214)
+++ trunk/step/step-web/src/main/webapp/js/toolbar_menu.js	2011-02-27 23:10:46 UTC (rev 215)
@@ -16,6 +16,8 @@
 		contentsource: "markup"
 	});
 	
+	this.setDefaultOptions();
+	
 	//also register a listener for ticking or unticking an option in the menu
 	$(menuRoot).hear("pane-menu-internal-state-changed-" + this.passageId, function(selfElement, menuOption) {
 		//menuOption is in the form { name: blah, selected: true/false }
@@ -118,6 +120,13 @@
 	});
 }
 
+/**
+ * sets up the default options for the menu
+ */
+ToolbarMenu.prototype.setDefaultOptions = function() {
+	this.toggleMenuItem("HEADINGS");
+	this.toggleMenuItem("VERSE_NUMBERS");
+}
 
 /**
  * returns all menu items matching the name specified




More information about the Tynstep-svn mailing list