aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--biblez.appcache2
-rw-r--r--source/about.js17
-rw-r--r--source/main.js15
3 files changed, 22 insertions, 12 deletions
diff --git a/biblez.appcache b/biblez.appcache
index 808c6a5..66aa58e 100644
--- a/biblez.appcache
+++ b/biblez.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# v11 - 2014-04-14
+# v12 - 2014-04-15
CACHE:
icon.png
index.html
diff --git a/source/about.js b/source/about.js
index 8f724e7..3617fd1 100644
--- a/source/about.js
+++ b/source/about.js
@@ -8,7 +8,7 @@ enyo.kind({
components: [
{kind: "onyx.MoreToolbar", layoutKind:"FittableColumnsLayout", components: [
{kind: "onyx.IconButton", src: "assets/back.png", ontap: "handleBack"},
- {content: $L("About BibleZ")}
+ {name: "title", content: $L("About BibleZ")}
]},
{kind: "enyo.Scroller", fit: true, touch: true, components: [
{classes: "settings-container", style: "text-align: center;", components: [
@@ -25,8 +25,21 @@ enyo.kind({
]}
],
+ version: "",
+
+ rendered: function () {
+ this.inherited(arguments);
+ var request = navigator.mozApps.getSelf();
+ request.onsuccess = enyo.bind(this, function() {
+ if (request.result) {
+ this.version = request.result.manifest.version;
+ this.$.title.addContent(" v" + this.version);
+ }
+ });
+ },
+
handleMail: function () {
- window.location = "mailto:info@zefanjas.de";
+ window.location = "mailto:info@zefanjas.de?subject=BibleZ " + this.version;
},
handleBack: function() {
diff --git a/source/main.js b/source/main.js
index be3241e..f66cc7c 100644
--- a/source/main.js
+++ b/source/main.js
@@ -250,7 +250,7 @@ enyo.kind({
},
passageChanged: function (inSender, inEvent) {
- //console.log(inEvent);
+ //console.log("passagedChanged: ", inEvent);
this.$.bcPopup.hide();
if (!inEvent.offsetRef) {
delete inEvent.originator;
@@ -282,8 +282,9 @@ enyo.kind({
this.$.topTB.resized();
}
//console.log(!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef, this.reachedBottom, this.reachedTop, inEvent.offsetRef)
- if (!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef)
+ if (!this.reachedBottom && !this.reachedTop && !inEvent.offsetRef) {
this.handlePassage(this.passage);
+ }
return true;
},
@@ -335,9 +336,6 @@ enyo.kind({
this.hasVerseNumber = verseNumber+1;
}
} else {
- if(inError.code && inError.code === 123) {
- //handle old internal module format
- }
this.handleError(inError.message);
}
}));
@@ -625,7 +623,7 @@ enyo.kind({
this.rowSize = Math.round(b.height / this.verses.length); // this.$.verseList.getRowSize();
this.offset = Math.round(b.top / this.rowSize);
if (this.verses[this.offset] && this.verses[this.offset].osisRef) {
- this.setPassage({offsetRef: this.verses[this.offset].osisRef});
+ //this.setPassage({offsetRef: this.verses[this.offset].osisRef});
}
}
@@ -666,7 +664,6 @@ 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) {
@@ -684,7 +681,7 @@ enyo.kind({
} else {
this.handleError(inError.message);
}
-
+ inCallback();
}));
} else {
var p = this.verses[1].osisRef.slice(0,this.verses[1].osisRef.lastIndexOf("."));
@@ -695,7 +692,6 @@ 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);
@@ -721,6 +717,7 @@ enyo.kind({
} else {
this.handleError(inError.message);
}
+ inCallback();
}));
}
},