Commit 7cf08795 authored by Troy A. Griffitts's avatar Troy A. Griffitts

Added new style for topBarButtonPressed. Fixed chapter select Book name to be...

Added new style for topBarButtonPressed. Fixed chapter select Book name to be localized. Added enableDailyDevotionals flag. Hide BibleSync settings when disabled.
parent 4e434321
......@@ -705,6 +705,10 @@ input:checked + .slider:before {
color: transparent;
}
.topBarButtonPressed {
background-color: #007D48;
}
.eusebianNumber {
width:1px !important;
padding:0 0 0 0 !important;
......
......@@ -3,6 +3,7 @@ var app = {
backFunction: null,
enableBibleSync : true,
enableViewTypes : true,
enableDailyDevotionals : true,
bibleSyncRefs : [],
isPopupShowing : false,
basicStartupStage : 0,
......@@ -774,15 +775,15 @@ console.log('setShowGospelParallels: ' + value);
$('#popup').hide();
app.isPopupShowing = false;
},
selectChapter: function(bookName) {
selectChapter: function(osisID, bookName) {
SWORD.mgr.getModuleByName(app.getCurrentMod1(), function(masterModule) {
if (!masterModule) alert ('No Bible Selected. Please first select an installed module.');
else {
masterModule.setKeyText(bookName, function() {
masterModule.setKeyText(osisID, function() {
masterModule.getVerseKey(function(vk) {
var t = '<div class="center"><div class="bookButton" onclick="app.selectKey(); return false;">'+bookName+'</div> ';
for (var i = 1; i <= vk.chapterMax; ++i) {
t += '<div class="bookButton" onclick="app.setCurrentKey(\''+bookName+'.'+i+'.1\', function() { app.displayCurrentChapter(); app.popupHide(); return false; });">'+i+'</div> ';
t += '<div class="bookButton" onclick="app.setCurrentKey(\''+osisID+'.'+i+'.1\', function() { app.displayCurrentChapter(); app.popupHide(); return false; });">'+i+'</div> ';
}
t += '</div>';
t += '<br/>';
......@@ -804,7 +805,7 @@ console.log('setShowGospelParallels: ' + value);
for (var i = 0; i < books.length; ++i) {
var nt = (SWORD.osisNT.indexOf(books[i].osisName) !== -1);
var ot = (SWORD.osisOT.indexOf(books[i].osisName) !== -1);
t += '<div class="bookButton'+(nt?' ntBook':ot?' otBook':' apocBook')+'" onclick="app.selectChapter(\''+books[i].osisName+'\'); return false;">'+books[i].abbrev+'</div> ';
t += '<div class="bookButton'+(nt?' ntBook':ot?' otBook':' apocBook')+'" onclick="app.selectChapter(\''+books[i].osisName+'\', \''+books[i].abbrev+'\'); return false;">'+books[i].abbrev+'</div> ';
}
t += '</div>';
t += '<br/>';
......@@ -905,7 +906,9 @@ console.log('Installed module: ' + mods[i].name + '; features.length: ' + mods[i
t += '<tr class="menuLabel" onclick="verseStudy.show();return false;"><td><img src="img/ic_action_location_searching.png" style="height:1em;"/> <span id="verseStudyLabel" data-english="Verse Study">Verse Study</span></td></tr>';
// Daily Devotionals
if (app.enableDailyDevotionals) {
t += '<tr class="menuLabel" onclick="dailyDevo.show();return false;"><td><img src="img/ic_action_about.png" style="height:1em;"/> <span id="dailyDevoLabel" data-english="Daily Devotion">Daily Devotion</span></td></tr>';
}
// Bookmarks
t += '<tr><td class="menuLabel" onclick="app.toggleBookmarks(); return false;"><img src="img/bookmarks.png" style="height:1em;"/> <span id="bookmarksLabel" data-english="Bookmarks">Bookmarks</span></td></tr>';
......@@ -944,8 +947,10 @@ console.log('Installed module: ' + mods[i].name + '; features.length: ' + mods[i
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Language">Language</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setAppLocale($(this).val()); return false;" id="appLocale"></select></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<button id="decreaseUIFontButton" onclick="app.decreaseUIFont();return false;" style="width:2em;font-size:130%"> - </button>&nbsp; <span data-english="Font Size">Font Size</span> &nbsp;<button id="increaseUIFontButton" onclick="app.increaseUIFont();return false;" style="width:2em;font-size:130%"> + </button></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="Theme">Theme</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<select style="width:15em;" onchange="app.setAppTheme($(this).val()); return false;" id="appTheme"></select></div>';
if (app.enableBibleSync) {
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="BibleSync User">BibleSync User</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<input style="width:15em;" onchange="app.setBibleSyncUserName($(this).val()); return false;" id="bibleSyncUserName"/></div>';
t += '<div style="padding-bottom:.5em;line-height:initial;">&nbsp;&nbsp;&nbsp;&nbsp;<span data-english="BibleSync Passphrase">BibleSync Passphrase</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;<input style="width:15em;" onchange="app.setBibleSyncPassphrase($(this).val()); return false;" id="bibleSyncPassphrase"/></div>';
}
t += '</div></td></tr>';
// About
......@@ -1240,7 +1245,7 @@ console.log("****** closing topBar");
openFootnotes: function(force) {
if (!force && $('#openFootnotes').is(':checked')) return false;
$('.fn').css('display', 'initial');
$('.notesButton').css('background-color', '#007D48');
$('.notesButton').addClass('topBarButtonPressed');
window.localStorage.setItem('showingFootnotes', 'true');
$('#openFootnotes').prop('checked', true).change();
app.displayFootnotes();
......@@ -1250,7 +1255,7 @@ console.log("****** closing topBar");
closeFootnotes: function(force) {
if (!force && !$('#openFootnotes').is(':checked')) return false;
$('.fn').css('display', 'none');
$('.notesButton').css('background', 'initial');
$('.notesButton').removeClass('topBarButtonPressed');
window.localStorage.setItem('showingFootnotes', 'false');
$('#openFootnotes').prop('checked', false).change();
return true;
......
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