[Tynstep-svn] r240 - in trunk/step: step-core/src/main/java/com/tyndalehouse/step/core/models step-core/src/main/java/com/tyndalehouse/step/core/utils step-parent step-web/src/main/webapp/css step-web/src/main/webapp/js

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Tue Apr 17 10:13:54 MST 2012


Author: ChrisBurrell
Date: 2012-04-17 10:13:53 -0700 (Tue, 17 Apr 2012)
New Revision: 240

Modified:
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/models/BibleVersion.java
   trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/utils/JSwordUtils.java
   trunk/step/step-parent/pom.xml
   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/passage.js
Log:
identifying versions with morphology/interlinear/etc.

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/models/BibleVersion.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/models/BibleVersion.java	2012-04-17 15:46:56 UTC (rev 239)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/models/BibleVersion.java	2012-04-17 17:13:53 UTC (rev 240)
@@ -14,6 +14,7 @@
     private String name;
     private String language;
     private boolean hasStrongs;
+    private boolean hasMorphology;
 
     /**
      * @return true if the version contains strong-tagged information
@@ -23,6 +24,20 @@
     }
 
     /**
+     * @return the hasMorphology
+     */
+    public boolean isHasMorphology() {
+        return this.hasMorphology;
+    }
+
+    /**
+     * @param hasMorphology the hasMorphology to set
+     */
+    public void setHasMorphology(final boolean hasMorphology) {
+        this.hasMorphology = hasMorphology;
+    }
+
+    /**
      * @param hasStrongs true if the version contains strong information
      */
     public void setHasStrongs(final boolean hasStrongs) {

Modified: trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/utils/JSwordUtils.java
===================================================================
--- trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/utils/JSwordUtils.java	2012-04-17 15:46:56 UTC (rev 239)
+++ trunk/step/step-core/src/main/java/com/tyndalehouse/step/core/utils/JSwordUtils.java	2012-04-17 17:13:53 UTC (rev 240)
@@ -48,6 +48,8 @@
                 v.setLanguage(language.getName());
             }
             v.setHasStrongs(b.hasFeature(FeatureType.STRONGS_NUMBERS));
+            v.setHasMorphology(b.hasFeature(FeatureType.MORPHOLOGY));
+
             versions.add(v);
         }
 

Modified: trunk/step/step-parent/pom.xml
===================================================================
--- trunk/step/step-parent/pom.xml	2012-04-17 15:46:56 UTC (rev 239)
+++ trunk/step/step-parent/pom.xml	2012-04-17 17:13:53 UTC (rev 240)
@@ -69,6 +69,7 @@
 		<developerConnection>scm:svn:https://crosswire.org/svn/tynstep/trunk</developerConnection>
 		<url>https://crosswire.org/svn/tynstep/trunk/</url>
 	</scm>
+	
 
 	<distributionManagement>
 		<snapshotRepository>
@@ -464,5 +465,8 @@
 				</plugin>
 			</plugins>
 		</pluginManagement>
+		
+
+		
 	</build>
 </project>

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 15:46:56 UTC (rev 239)
+++ trunk/step/step-web/src/main/webapp/css/initial-layout.css	2012-04-17 17:13:53 UTC (rev 240)
@@ -170,6 +170,33 @@
 	overflow: auto;
 }
 
+.features {
+	margin-left: 10px;
+	float: right;	
+}
+
+.versionFeature {
+	padding-left: 3px;
+	padding-right: 3px;
+	background-color: #4EB305;
+	font-size: xx-small;
+	color: white;
+	font-weight: bold;	
+}
+
+.strongs {
+	background-color: blue;
+}
+
+.interlinear {
+	background-color: orange;
+}
+	
+.morphology {
+	background-color: red;
+}
+
+
 /*********************************************/
 /** BOTTOM COMPONENT
 /*********************************************/

Modified: trunk/step/step-web/src/main/webapp/js/init.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/init.js	2012-04-17 15:46:56 UTC (rev 239)
+++ trunk/step/step-web/src/main/webapp/js/init.js	2012-04-17 17:13:53 UTC (rev 240)
@@ -149,17 +149,25 @@
 	
 	$.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) {
-				strongedVersions[ii++] = { label: showingText, value: item.initials };
+				features += " " + "<span class='versionFeature strongs' title='Supports Strongs concordance'>S</span>";
+				features += " " + "<span class='versionFeature interlinear' 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>";
+			}
+			
 			//return response for dropdowns
 			return {
 				label : showingText,
-				value : item.initials
+				value : item.initials,
+				features: features
 			}
 		});
 		

Modified: trunk/step/step-web/src/main/webapp/js/passage.js
===================================================================
--- trunk/step/step-web/src/main/webapp/js/passage.js	2012-04-17 15:46:56 UTC (rev 239)
+++ trunk/step/step-web/src/main/webapp/js/passage.js	2012-04-17 17:13:53 UTC (rev 240)
@@ -71,6 +71,14 @@
 	}).change(function() {
 		$.shout("version-changed-" + self.passageId, this.value);
 	});
+	
+	this.version.data( "autocomplete" )._renderItem = function( ul, item ) {
+		return $( "<li></li>" )
+		.data( "item.autocomplete", item )
+		.append( "<a><span class='features'>" + item.features + "</span>" + item.label + "</a>")
+		.appendTo( ul )
+	}
+	
 };
 
 Passage.prototype.initReferenceTextBox = function() {	




More information about the Tynstep-svn mailing list