[sword-svn] r395 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Sat Jul 7 09:44:00 MST 2012
Author: scribe
Date: 2012-07-07 09:43:59 -0700 (Sat, 07 Jul 2012)
New Revision: 395
Modified:
trunk/webapp/simplegadget.jsp
Log:
Show modules correctly in config
throw selected messages appropriately
scrollto better
Modified: trunk/webapp/simplegadget.jsp
===================================================================
--- trunk/webapp/simplegadget.jsp 2011-11-18 01:22:14 UTC (rev 394)
+++ trunk/webapp/simplegadget.jsp 2012-07-07 16:43:59 UTC (rev 395)
@@ -40,7 +40,7 @@
for (int i = 0; i < modInfo.length; i++) {
if (SwordOrb.BIBLES.equals(modInfo[i].category)) {
SWModule book = mgr.getModuleByName(modInfo[i].name);
-%><EnumValue value="<%= modInfo[i].name %>" display_value="[<%= modInfo[i].name %>]"/>
+%><EnumValue value="<%= modInfo[i].name %>" display_value="<%= modInfo[i].name %>"/>
<%
}
}
@@ -135,7 +135,11 @@
content.innerHTML = results[1];
var new_position = $('#cv').offset();
- window.scrollTo(new_position.left,new_position.top);
+ if (new_position) {
+ window.scrollTo(new_position.left,new_position.top);
+ }
+ if (gadgets.util.hasFeature('pubsub-2')) gadgets.Hub.publish("interedition.biblicalcontent.selected", results[0]);
+
}
function lookup(verse) {
@@ -192,7 +196,7 @@
}
function page_select_callback(topic, data, subscriberData) {
- if (data.bibcont != null) {
+ if (data.bibcont != null && data.bibcont.length > 0) {
lookup(data.bibcont);
}
}
@@ -200,13 +204,15 @@
function loaded() {
var prefs = new gadgets.Prefs();
swordModule = prefs.getString('swordModule');
- subId = gadgets.Hub.subscribe("interedition.page.selected", page_select_callback);
gadgets.window.adjustHeight(500);
positionFromURLParams();
}
if (gadgets.util.hasFeature('pubsub-2')) {
- gadgets.HubSettings.onConnect = function(hum, suc, err) { loaded(); };
+ gadgets.HubSettings.onConnect = function(hum, suc, err) {
+ subId = gadgets.Hub.subscribe("interedition.page.selected", page_select_callback);
+ loaded();
+ };
}
else gadgets.util.registerOnLoadHandler(loaded);
More information about the sword-cvs
mailing list