Commit a26c634d authored by Troy A. Griffitts's avatar Troy A. Griffitts

Fixed missing " in Font Size. Added check for empty search string. Added module.search to mockup

parent 22c7d2a4
<?xml version='1.0' encoding='utf-8'?>
<widget id="org.crosswire.bishop" version="1.3.903" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<widget id="org.crosswire.bishop" version="1.4.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<name>Bishop</name>
<description>
A Bible Study App from CrossWire
......
var app = {
version: '1.3.904', // change version here and in config.xml, near top
version: '1.4.0', // change version here and in config.xml, near top
backFunction: null,
enableBibleSync : true,
enableGospelParallels : true,
......@@ -48,7 +48,7 @@ console.log('using localFixup instead of real SWORD plugin');
var sampleModInfo = { category : 'Biblical Texts', name : 'KJV', features: [] };
var sampleVerseKey = { testament : 2, book : 4, chapter : 3, verse: 16, chapterMax: 23, verseMax: 40, bookName : 'John', osisRef: 'John.3.16', shortText : 'John 3:16', bookAbbrev : 'John' };
var sampleVerse = { verse : $.extend(true, {}, sampleVerseKey), preVerse : '', text:'For God so loved the world that He gave His only Son that whosoever believes in Him would have everlasting life.'}
var sampleModule = { name : 'KJV', description : 'King James Version, 1763', direction : 'LtoR', shortCopyright : '(c) 1611, The Crown', features : [], shortPromo:'Visit Great Britain for dreary skies and bad food', setKeyText : function(k, callback) {if(callback)callback();}, getKeyText : function(callback) { return callback ? callback('Jn.2.2') : false;}, getKeyChildren : function(callback) { return callback ? callback([2, 4, 3, 16, 34]) : false;}, getVerseKey: function(callback) { if(callback)callback(sampleVerseKey);return sampleVerseKey; }, getBookNames : function(callback) { var bn = [{ osisName: 'Gen', abbrev: 'Gen'}, { abbrev: 'Exod', osisName: 'Exod'}, { abbrev: 'Lev', osisName: 'Lev'}, { abbrev: 'Num', osisName: 'Num'}, { abbrev: 'Deut', osisName: 'Deut'}, { abbrev: 'Josh', osisName: 'Josh'}, { abbrev: 'Matt', osisName: 'Matt'}, { abbrev: 'Mark', osisName: 'Mark'}, { abbrev: 'Luke', osisName: 'Luke'}, { abbrev: 'John', osisName: 'John'}]; if(callback)callback(bn); return bn;}, getRenderText : function(callback) { if(callback)callback(sampleVerse.text);}, getRenderChapter : function(mod, callback) { var rc = []; for (var i = 0; i<20; ++i) { var v = $.extend(true, {},sampleVerse); v.verse.verse=i+1; rc.push(v); } if(callback)callback(rc);}, getRenderHeader : function(callback) { if(callback)callback('');return '';}, parseKeyList : function(keyListText, callback) { return (callback) ? callback(['John.3.3','John.3.16']) : false;}, };
var sampleModule = { name : 'KJV', description : 'King James Version, 1763', direction : 'LtoR', shortCopyright : '(c) 1611, The Crown', features : [], shortPromo:'Visit Great Britain for dreary skies and bad food', setKeyText : function(k, callback) {if(callback)callback();}, getKeyText : function(callback) { return callback ? callback('Jn.2.2') : false;}, getKeyChildren : function(callback) { return callback ? callback([2, 4, 3, 16, 34]) : false;}, getVerseKey: function(callback) { if(callback)callback(sampleVerseKey);return sampleVerseKey; }, getBookNames : function(callback) { var bn = [{ osisName: 'Gen', abbrev: 'Gen'}, { abbrev: 'Exod', osisName: 'Exod'}, { abbrev: 'Lev', osisName: 'Lev'}, { abbrev: 'Num', osisName: 'Num'}, { abbrev: 'Deut', osisName: 'Deut'}, { abbrev: 'Josh', osisName: 'Josh'}, { abbrev: 'Matt', osisName: 'Matt'}, { abbrev: 'Mark', osisName: 'Mark'}, { abbrev: 'Luke', osisName: 'Luke'}, { abbrev: 'John', osisName: 'John'}]; if(callback)callback(bn); return bn;}, search : function(p1,p2,p3,p4,callback) { callback({ status : 'update', percent : 100 }); return callback({ status : 'complete', results : [ {key : 'John 3:3'}, {key : 'John 3:16'}]}); }, getRenderText : function(callback) { if(callback)callback(sampleVerse.text);}, getRenderChapter : function(mod, callback) { var rc = []; for (var i = 0; i<20; ++i) { var v = $.extend(true, {},sampleVerse); v.verse.verse=i+1; rc.push(v); } if(callback)callback(rc);}, getRenderHeader : function(callback) { if(callback)callback('');return '';}, parseKeyList : function(keyListText, callback) { return (callback) ? callback(['John.3.3','John.3.16']) : false;}, };
// [0..] [VERSEKEY_TESTAMENT, VERSEKEY_BOOK, VERSEKEY_CHAPTER, VERSEKEY_VERSE, VERSEKEY_CHAPTERMAX, ... ]
var eusNum = { name : 'Eusebian_num', description : 'Eusebian Numbers', direction : 'LtoR', shortCopyright : 'Copyright 220 Ammonius of Alexandria', features : [], shortPromo:'Beware of plagiarism!', setKeyText : function(k, callback) {if(callback)callback();}, getKeyText : function() { return 'Jn.2.2';}, getVerseKey: function(callback) { if(callback)callback(sampleVerseKey);return sampleVerseKey; }, getBookNames : function(callback) { var bn = [{ osisName: 'Gen', abbrev: 'Gen'}, { abbrev: 'Exod', osisName: 'Exod'}, { abbrev: 'Lev', osisName: 'Lev'}, { abbrev: 'Num', osisName: 'Num'}, { abbrev: 'Deut', osisName: 'Deut'}, { abbrev: 'Josh', osisName: 'Josh'}, { abbrev: 'Matt', osisName: 'Matt'}, { abbrev: 'Mark', osisName: 'Mark'}, { abbrev: 'Luke', osisName: 'Luke'}, { abbrev: 'John', osisName: 'John'}]; if(callback)callback(bn); return bn;}, getStripText : function(callback) { if(callback)callback('<EusebianNumber id="2.1" table="II" osisRef="Mark.1.1-2" assocates="1.103 3.70" />');}, getRawEntry : function(callback) { if(callback)callback('<EusebianNumber id="2.1" table="II" osisRef="Mark.1.1-2" assocates="1.103 3.70" />');}, getRenderText : function(callback) { if(callback)callback('<EusebianNumber id="2.1" table="II" osisRef="Mark.1.1-2" assocates="1.103 3.70" />');}, getRenderChapter : function(mod, callback) { var rc = []; for (var i = 0; i<20; ++i) { var v = $.extend(true, {},sampleVerse); v.verse.verse=i+1; rc.push(v); } if(callback)callback(rc);}, getRenderHeader : function(callback) { if(callback)callback('');return '';} };
var eusVs = { name : 'Eusebian_vs', description : 'Eusebian Numbers by Verse', direction : 'LtoR', shortCopyright : 'Copyright 220 Ammonius of Alexandria', features : [], shortPromo:'Beware of plagiarism!', setKeyText : function(k, callback) {if(callback)callback();}, getKeyText : function() { return 'Jn.2.2';}, getVerseKey: function(callback) { if(callback)callback(sampleVerseKey);return sampleVerseKey; }, getBookNames : function(callback) { var bn = [{ osisName: 'Gen', abbrev: 'Gen'}, { abbrev: 'Exod', osisName: 'Exod'}, { abbrev: 'Lev', osisName: 'Lev'}, { abbrev: 'Num', osisName: 'Num'}, { abbrev: 'Deut', osisName: 'Deut'}, { abbrev: 'Josh', osisName: 'Josh'}, { abbrev: 'Matt', osisName: 'Matt'}, { abbrev: 'Mark', osisName: 'Mark'}, { abbrev: 'Luke', osisName: 'Luke'}, { abbrev: 'John', osisName: 'John'}]; if(callback)callback(bn); return bn;}, getRenderText : function(callback) { if(callback)callback('1.103');}, getRenderChapter : function(mod, callback) { var rc = []; for (var i = 0; i<20; ++i) { var v = $.extend(true, {},sampleVerse); v.verse.verse=i+1; rc.push(v); } if(callback)callback(rc);}, getRenderHeader : function(callback) { if(callback)callback('');return '';} };
......@@ -1054,7 +1054,7 @@ console.log('setShowGospelParallels: ' + value);
t += '<div class="subMenuItem" style="margin-right:0"><span data-english="Show Gospel Parallels">Show Gospel Parallels</span><label style="float:right;" class="switch"><input id="gospelParallelsSwitch" onchange="app.toggleGospelParallels(); return false;" type="checkbox"><span class="slider round"></span></label></div>';
}
t += '<div class="subMenuItem" style="clear:both;"><span data-english="Language">Language</span><br/><select style="width:100%;" onchange="app.setAppLocale($(this).val()); return false;" id="appLocale"></select></div>';
t += '<div class="subMenuItem"><button id="decreaseUIFontButton" onclick="app.decreaseUIFont();return false;" style="float:left;width:2em;font-size:130%"> - </button><button id="increaseUIFontButton" onclick="app.increaseUIFont();return false;" style="float:right;width:2em;font-size:130%"> + </button><div style="text-align:center;data-english="Font Size">Font Size</div></div>';
t += '<div class="subMenuItem"><button id="decreaseUIFontButton" onclick="app.decreaseUIFont();return false;" style="float:left;width:2em;font-size:130%"> - </button><button id="increaseUIFontButton" onclick="app.increaseUIFont();return false;" style="float:right;width:2em;font-size:130%"> + </button><div style="text-align:center;" data-english="Font Size">Font Size</div></div>';
t += '<div class="subMenuItem" style="clear:both;"><span data-english="Theme">Theme</span><br/><select style="width:100%;" onchange="app.setAppTheme($(this).val()); return false;" id="appTheme"></select></div>';
t += '<div class="subMenuItem"><span data-english="Font: Reading">Font: Reading</span><br/><select style="width:100%;" onchange="app.setFontReading($(this).val()); return false;" id="fontReading"></select></div>';
t += '<div class="subMenuItem"><span data-english="Font: App">Font: App</span><br/><select style="width:100%;" onchange="app.setFontApp($(this).val()); return false;" id="fontApp"></select></div>';
......@@ -1582,8 +1582,12 @@ console.log('footnotes: ' + footnotes.length);
},
search: function() {
var searchExpression = $('#searchExpression').val().trim();
// assert we have something for which to search
if (searchExpression.length == 0) return;
SWORD.mgr.getModuleByName(app.getCurrentMod1(), function(module) {
module.search($('#searchExpression').val(), module.SEARCHTYPE_MULTIWORD, module.SEARCHOPTION_ICASE, null, function(e) {
module.search(searchExpression, module.SEARCHTYPE_MULTIWORD, module.SEARCHOPTION_ICASE, null, function(e) {
if (e.status == 'update') {
$('#searchResults').html(installMgr.getProgressHTML(e.percent + '%', e.percent));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment