diff options
author | zefanja <zefanja@freenet.de> | 2014-04-14 09:41:22 +0700 |
---|---|---|
committer | zefanja <zefanja@freenet.de> | 2014-04-14 09:41:22 +0700 |
commit | 340e447622aed8547b0aa07ceda66b99b1aa7230 (patch) | |
tree | 009b4cd9099f1686f7a83f77fd52d475e53ac975 | |
parent | 01df8de99bff929303b2df76d3997c90a6981641 (diff) | |
download | biblez-ng-340e447622aed8547b0aa07ceda66b99b1aa7230.tar.gz |
* fixed bug in handling and rendering history items (last read passages)
-rw-r--r-- | biblez.appcache | 2 | ||||
-rw-r--r-- | manifest.desktop | 2 | ||||
-rw-r--r-- | source/main.js | 21 |
3 files changed, 16 insertions, 9 deletions
diff --git a/biblez.appcache b/biblez.appcache index 96097a6..808c6a5 100644 --- a/biblez.appcache +++ b/biblez.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# v10 - 2014-04-12 +# v11 - 2014-04-14 CACHE: icon.png index.html diff --git a/manifest.desktop b/manifest.desktop index 2a9e7a9..a1d9c5c 100644 --- a/manifest.desktop +++ b/manifest.desktop @@ -1,6 +1,6 @@ { "name": "BibleZ", - "version": "1.3.3", + "version": "1.3.4", "description": "BibleZ is an easy to use offline bible reader app for your Firefox! Enjoy the full bible at your fingertips. <b>Features:</b> <ul><li>many available bibles in different languages (e.g. ESV, KJV, NET (free version), ...)</li><li>notes</li><li>bookmarks</li><li>highlights</li><li>history of last read scriptures</li><li>no internet connection required (only for downloading modules)</li></ul> BibleZ is based on the SWORD Project (http://crosswire.org) and licenced under GPLv3. If you have any problems with this app just send an eMail to <a href:mailto:info@zefanjas.de>info@zefanjas.de</a>!", "launch_path": "/biblez-ng/app/index.html", "icons": { diff --git a/source/main.js b/source/main.js index d7d3de8..9e5ff6f 100644 --- a/source/main.js +++ b/source/main.js @@ -231,9 +231,9 @@ enyo.kind({ this.$.bcSelector.setModule(this.currentModule); //Load the verses - //console.log(this.passage, this.settings); - if(this.passage === this.settings.lastRead || !this.settings.lastRead) + if(this.passage === this.settings.lastRead || !this.settings.lastRead) { this.handlePassage(this.passage); + } if(this.settings) this.setPassage((this.settings.lastRead) ? this.settings.lastRead : this.passage); @@ -250,6 +250,7 @@ enyo.kind({ }, passageChanged: function (inSender, inEvent) { + //console.log(inEvent); this.$.bcPopup.hide(); if (!inEvent.offsetRef) { delete inEvent.originator; @@ -269,8 +270,6 @@ enyo.kind({ } } - if (!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef) - this.handlePassage(this.passage); //Persist current passage if ((this.settings.lastRead && this.passage.osisRef !== this.settings.lastRead.osisRef) || !this.settings.lastRead) { @@ -282,6 +281,10 @@ enyo.kind({ //Adjust the TB Icons this.$.topTB.resized(); } + //console.log(!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef, this.reachedBottom, this.reachedTop, inEvent.offsetRef) + if (!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef) + this.handlePassage(this.passage); + return true; }, @@ -338,6 +341,9 @@ enyo.kind({ this.handleError(inError.message); } })); + + //Render History Menu + this.renderHistory(); }, setVerses: function (inSender, inEvent) { @@ -376,7 +382,7 @@ enyo.kind({ historySelected: function (inSender, inEvent) { if (!isNaN(inEvent.originator.index)) { - this.setPassage(this.history[inEvent.originator.index].osisRef); + this.setPassage(this.history[inEvent.originator.index]); } }, @@ -655,6 +661,7 @@ enyo.kind({ } var next = sword.verseKey.next(n, this.currentModule.config.Versification); this.loadText(next.osisRef, enyo.bind(this, function (inError, inResult) { + inCallback(); if(!inError) { var caps = ""; if(inResult.rtol) { @@ -672,7 +679,7 @@ enyo.kind({ } else { this.handleError(inError.message); } - inCallback(); + })); } else { var p = this.verses[1].osisRef.slice(0,this.verses[1].osisRef.lastIndexOf(".")); @@ -683,6 +690,7 @@ enyo.kind({ var previous = sword.verseKey.previous(p, this.currentModule.config.Versification); //console.log("Previous:", previous); this.loadText(previous.osisRef, enyo.bind(this, function (inError, inResult) { + inCallback(); if(!inError) { if(inResult.hasOwnProperty("footnotes")) this.footnotes = api.extend(this.footnotes, inResult.footnotes); @@ -708,7 +716,6 @@ enyo.kind({ } else { this.handleError(inError.message); } - inCallback(); })); } }, |