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

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Mon Mar 21 11:24:07 MST 2011


Author: ChrisBurrell
Date: 2011-03-21 11:24:07 -0700 (Mon, 21 Mar 2011)
New Revision: 222

Modified:
   trunk/step/step-web/src/main/webapp/css/initial-fonts.css
   trunk/step/step-web/src/main/webapp/css/initial-layout.css
   trunk/step/step-web/src/main/webapp/index.jsp
   trunk/step/step-web/src/main/webapp/js/bookmark.js
   trunk/step/step-web/src/main/webapp/js/init.js
   trunk/step/step-web/src/main/webapp/js/passage.js
   trunk/step/step-web/src/main/webapp/js/toolbar_menu.js
   trunk/step/step-web/src/main/webapp/js/ui_hooks.js
   trunk/step/step-web/src/main/webapp/panemenu.html
   trunk/step/step-web/src/main/webapp/topmenu.html
Log:


Modified: trunk/step/step-web/src/main/webapp/css/initial-fonts.css
===================================================================
--- trunk/step/step-web/src/main/webapp/css/initial-fonts.css	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/css/initial-fonts.css	2011-03-21 18:24:07 UTC (rev 222)
@@ -9,6 +9,10 @@
 	color: #ccc;
 }
 
+.notYetImplemented {
+	background-color: black !important ;
+}
+
 .ui-widget {
 	font-family: Verdana;
 }

Modified: trunk/step/step-web/src/main/webapp/css/initial-layout.css
===================================================================
--- trunk/step/step-web/src/main/webapp/css/initial-layout.css	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/css/initial-layout.css	2011-03-21 18:24:07 UTC (rev 222)
@@ -144,6 +144,14 @@
 .passageContainer {
 }
 
+.bookmarkPassageLink {
+	float: right;
+	height: 16px	
+	width: 16px;
+	margin-top: 5px;
+	margin-right: 5px;
+}
+
 .passageText {
 	position: relative;
 	top: 30px;
@@ -153,6 +161,7 @@
 .headingContainer {
 	position: absolute;
 	top: 0px;
+	width: 99%;
 }
 
 .passageContent {

Modified: trunk/step/step-web/src/main/webapp/index.jsp
===================================================================
--- trunk/step/step-web/src/main/webapp/index.jsp	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/index.jsp	2011-03-21 18:24:07 UTC (rev 222)
@@ -42,6 +42,7 @@
 		<div id="leftPaneMenu" class="innerMenus"></div>
 	    <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="Rom 1:1-7" />
 		    	<input id="leftPassageBook" class="heading editable passageVersion" size="5" value="KJV" />
 	    	</div>
@@ -75,6 +76,7 @@
 		<div id="rightPaneMenu" class="innerMenus"></div>
 	    <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" />
 	    	</div>

Modified: trunk/step/step-web/src/main/webapp/js/bookmark.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/bookmark.js	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/js/bookmark.js	2011-03-21 18:24:07 UTC (rev 222)
@@ -13,6 +13,10 @@
 	this.historyContainer.hear("passage-changed", function(selfElement, data) {
 		self.addHistory(data.reference);
 	});
+
+	this.bookmarkContainer.hear("bookmark-addition-requested", function(selfElement, data) {
+		self.addBookmark(data.reference);
+	});
 	
 	this.initialiseHistory();
 	
@@ -88,7 +92,16 @@
 	
 	this.setHistory(history);
 };	
-	
+
+
+Bookmark.prototype.addBookmark = function(passageReference) {
+	var self = this;
+	$.getSafe(BOOKMARKS_ADD + passageReference, function(data) {
+		self.createBookmarkItem(passageReference, this.bookmarkContainer, false);
+	});
+};	
+
+
 Bookmark.prototype.initialiseHistory = function() {
 	var history = this.getHistory();
 	if(history != null) {

Modified: trunk/step/step-web/src/main/webapp/js/init.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/init.js	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/js/init.js	2011-03-21 18:24:07 UTC (rev 222)
@@ -196,14 +196,6 @@
 }
 
 function initGlobalHandlers() {
-	$("#loading").ajaxStart(function() {
-		$(this).show();
-	});
-
-	$("#loading").ajaxComplete(function() {
-		$(this).hide();
-	});
-	
 	//set always visible - should probably be its own class
 	$( "#loading" ).position({
 		of: $( "body" ),

Modified: trunk/step/step-web/src/main/webapp/js/passage.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/passage.js	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/js/passage.js	2011-03-21 18:24:07 UTC (rev 222)
@@ -11,6 +11,7 @@
 	this.version = $(".passageVersion", passageContainer);
 	this.reference = $(".passageReference", passageContainer);
 	this.passage = $(".passageContent", passageContainer);
+	this.bookmarkButton = $(".bookmarkPassageLink", passageContainer);
 	this.passageId = passageId;
 	
 	//read state from the cookie
@@ -53,6 +54,16 @@
 		self.reference.val(data);
 		self.changePassage();
 	});
+	
+	this.bookmarkButton.hear("bookmark-passage-" + this.passageId, function(selfElement, data) {
+		self.bookmarkButton.click();
+	});
+	
+	this.bookmarkButton
+		.button({ icons: {primary: "ui-icon-bookmark" }, text: false})
+		.click(function() {
+			$.shout("bookmark-addition-requested", { reference: self.reference.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-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/js/toolbar_menu.js	2011-03-21 18:24:07 UTC (rev 222)
@@ -102,7 +102,7 @@
 	var self = this;
 	$.getJSON(BIBLE_GET_FEATURES + version, function (features) {
 		//build up map of options
-		$("a", self.menuRoot).each(function(index, value) {
+		$("li:contains('Display') a", self.menuRoot).each(function(index, value) {
 			var changed = false;
 			for(var i = 0 ; features[i]; i++) {
 				if(value.name == features[i]) {

Modified: trunk/step/step-web/src/main/webapp/js/ui_hooks.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/ui_hooks.js	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/js/ui_hooks.js	2011-03-21 18:24:07 UTC (rev 222)
@@ -10,6 +10,7 @@
 // These are used as part of the rest-like calls
 /////////////////////////////////////////////////////////////////////////
 BOOKMARKS_GET = "rest/bookmark/getBookmarks";
+BOOKMARKS_ADD = "rest/bookmark/addBookmark/";
 
 BIBLE_GET_BIBLE_VERSIONS = "rest/bible/getBibleVersions/";
 BIBLE_GET_BIBLE_TEXT = "rest/bible/getBibleText/";

Modified: trunk/step/step-web/src/main/webapp/panemenu.html
===================================================================
--- trunk/step/step-web/src/main/webapp/panemenu.html	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/panemenu.html	2011-03-21 18:24:07 UTC (rev 222)
@@ -10,8 +10,13 @@
 	</li>
 	<li><a href="#">Context</a>
 	<ul>
-		<li><a href="#">Timeline</a></li>
+		<li><a href="#" class="notYetImplemented">Timeline</a></li>
 	</ul>
 	</li>
+	<li><a href="#">Tools</a>
+	<ul>
+		<li><a href="#" class="bookmarkPassageMenuItem">Bookmark passage</a></li>
+	</ul>
+	</li>
 </ul>
 <br style="clear: left" />
\ No newline at end of file

Modified: trunk/step/step-web/src/main/webapp/topmenu.html
===================================================================
--- trunk/step/step-web/src/main/webapp/topmenu.html	2011-03-19 15:53:06 UTC (rev 221)
+++ trunk/step/step-web/src/main/webapp/topmenu.html	2011-03-21 18:24:07 UTC (rev 222)
@@ -3,25 +3,25 @@
 <ul>
 	<li><a href="#">View</a>
 	<ul>
-		<li><a href="#">Quick</a></li>
-		<li><a href="#">Deeper</a></li>
-		<li><a href="#">Detail</a></li>
+		<li><a href="#" class="notYetImplemented">Quick [Coming soon]</a></li>
+		<li><a href="#" class="notYetImplemented">Deeper [Coming soon]</a></li>
+		<li><a href="#" class="notYetImplemented">Detail [Coming soon]</a></li>
 	</ul>
 	</li>
 
 	<li><a href="#">Tools</a>
 	<ul>
-		<li><a href="#">Install Bibles</a></li>
-		<li><a href="#">Update</a></li>
-		<li><a href="#">User preferences</a></li>
+		<li><a href="#" class="notYetImplemented">Install Bibles [Coming soon]</a></li>
+		<li><a href="#" class="notYetImplemented">Update [Coming soon]</a></li>
+		<li><a href="#" class="notYetImplemented">User preferences [Coming soon]</a></li>
 	</ul>
 	</li>
 
 	
 	<li><a href="#">Help</a>
 	<ul>
-		<li><a href="#">Help manual</a></li>
-		<li><a href="#">Tips & Tricks</a></li>
+		<li><a href="#" class="notYetImplemented">Help manual [Coming soon]</a></li>
+		<li><a href="#" class="notYetImplemented">Tips & Tricks [Coming soon]</a></li>
 		<li><a href="#" onclick="showAbout();">About...</a></li>
 	</ul>
 	</li>




More information about the Tynstep-svn mailing list