summaryrefslogtreecommitdiff
path: root/src/modules/filters/osiswordjs.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:01 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:54:01 -0400
commit71a39f4652cd51df814c930dd268f3c9ad2aee86 (patch)
tree5994350a603908c4e4d660bc9d72c4ec43dd648e /src/modules/filters/osiswordjs.cpp
parent03134fa5f6f25d92724ce4c183f9bbe12a9e37dc (diff)
Imported Upstream version 1.6.0+dfsg
Diffstat (limited to 'src/modules/filters/osiswordjs.cpp')
-rw-r--r--src/modules/filters/osiswordjs.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/modules/filters/osiswordjs.cpp b/src/modules/filters/osiswordjs.cpp
index dc805b4..da573d3 100644
--- a/src/modules/filters/osiswordjs.cpp
+++ b/src/modules/filters/osiswordjs.cpp
@@ -2,9 +2,24 @@
*
* osisstrongs - SWFilter descendant to hide or show strongs number
* in a OSIS module.
+ *
+ *
+ * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * CrossWire Bible Society
+ * P. O. Box 2528
+ * Tempe, AZ 85280-2528
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
*/
-
#include <stdlib.h>
#include <stdio.h>
#include <osiswordjs.h>
@@ -76,8 +91,11 @@ char OSISWordJS::processText(SWBuf &text, const SWKey *key, const SWModule *modu
SWBuf lemmaClass;
SWBuf lemma;
SWBuf morph;
+ SWBuf page;
SWBuf src;
char gh = 0;
+ page = module->getEntryAttributes()["Word"][wordstr]["Page"].c_str();
+ if (page.length()) page = (SWBuf)"p:" + page;
int count = atoi(module->getEntryAttributes()["Word"][wordstr]["PartCount"].c_str());
for (int i = 0; i < count; i++) {
@@ -146,7 +164,7 @@ char OSISWordJS::processText(SWBuf &text, const SWKey *key, const SWModule *modu
}
}
// 'p' = 'fillpop' to save bandwidth
- text.appendFormatted("<span class=\"clk\" onclick=\"p('%s','%s','%s','%s','','%s');\" >", lexName.c_str(), lemma.c_str(), wordID.c_str(), morph.c_str(), modName.c_str());
+ text.appendFormatted("<span class=\"clk\" onclick=\"p('%s','%s','%s','%s','%s','%s');\" >", lexName.c_str(), lemma.c_str(), wordID.c_str(), morph.c_str(), page.c_str(), modName.c_str());
wordNum++;
}
if ((*token == '/') && (token[1] == 'w') && option) { // Word