[sword-svn] r3462 - in trunk: src/modules/filters tests/testsuite

refdoc at crosswire.org refdoc at crosswire.org
Wed May 17 12:07:42 MST 2017


Author: refdoc
Date: 2017-05-17 12:07:42 -0700 (Wed, 17 May 2017)
New Revision: 3462

Modified:
   trunk/src/modules/filters/osisxhtml.cpp
   trunk/tests/testsuite/osis_basic.good
   trunk/tests/testsuite/osis_mod2zmod.good
   trunk/tests/testsuite/osis_osis2modcipher.good
Log:
css classes to references, this completes [API151}


Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp	2017-05-17 18:29:33 UTC (rev 3461)
+++ trunk/src/modules/filters/osisxhtml.cpp	2017-05-17 19:07:42 UTC (rev 3462)
@@ -173,7 +173,7 @@
 	suspendLevel = 0;
 	wordsOfChristStart = "<span class=\"wordsOfJesus\"> ";
 	wordsOfChristEnd   = "</span> ";
-	interModuleLinkStart = "<a href=\"sword://%s/%s\">";
+	interModuleLinkStart = "<a class=\"%s\" href=\"sword://%s/%s\">";
 	interModuleLinkEnd = "</a>";
 	if (module) {
 		osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
@@ -382,11 +382,19 @@
 					SWBuf target;
 					SWBuf work;
 					SWBuf ref;
+					SWBuf type;
+					SWBuf classes = "";
+					
 					bool is_scripRef = false;
 
 					target = tag.getAttribute("osisRef");
 					const char* the_ref = strchr(target, ':');
+					type = tag.getAttribute("type");
 					
+					if (type.size()) {
+						classes.append(type);
+					}
+					
 					if(!the_ref) {
 						// No work
 						ref = target;
@@ -407,7 +415,8 @@
 
 					if(is_scripRef)
 					{
-						buf.appendFormatted("<a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=\">",
+						buf.appendFormatted("<a class=\"%s\" href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=\">",
+							classes.c_str(),
 							URL::encode(ref.c_str()).c_str()
 //							(work.size()) ? URL::encode(work.c_str()).c_str() : "")
 							);
@@ -415,7 +424,8 @@
 					else
 					{
 						// Dictionary link, or something
-						buf.appendFormatted(u->interModuleLinkStart, 
+						buf.appendFormatted(u->interModuleLinkStart,
+							classes.c_str(), 
 							URL::encode(work.c_str()).c_str(),
 							URL::encode(ref.c_str()).c_str()
 							);

Modified: trunk/tests/testsuite/osis_basic.good
===================================================================
--- trunk/tests/testsuite/osis_basic.good	2017-05-17 18:29:33 UTC (rev 3461)
+++ trunk/tests/testsuite/osis_basic.good	2017-05-17 19:07:42 UTC (rev 3462)
@@ -51,7 +51,7 @@
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
 
-<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+<h3 class="title parallel">(<a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
 
 <br />
 

Modified: trunk/tests/testsuite/osis_mod2zmod.good
===================================================================
--- trunk/tests/testsuite/osis_mod2zmod.good	2017-05-17 18:29:33 UTC (rev 3461)
+++ trunk/tests/testsuite/osis_mod2zmod.good	2017-05-17 19:07:42 UTC (rev 3462)
@@ -51,7 +51,7 @@
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
 
-<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+<h3 class="title parallel">(<a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
 
 <br />
 

Modified: trunk/tests/testsuite/osis_osis2modcipher.good
===================================================================
--- trunk/tests/testsuite/osis_osis2modcipher.good	2017-05-17 18:29:33 UTC (rev 3461)
+++ trunk/tests/testsuite/osis_osis2modcipher.good	2017-05-17 19:07:42 UTC (rev 3462)
@@ -51,7 +51,7 @@
 Rendered Header:
  <h3 class="title">The Beginning of the Ministry of Jesus</h3>
 
-<h3 class="title parallel">(<a href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
+<h3 class="title parallel">(<a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Matt.4.12-Matt.4.22&module=">Matt 4:12–22</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.14&module=">Luke 4:14</a>, <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.4.15&module=">15</a>; <a class="" href="passagestudy.jsp?action=showRef&type=scripRef&value=Luke.5.1-Luke.5.11&module=">5:1-11</a>) </h3>
 
 <br />
 




More information about the sword-cvs mailing list