aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzefanja <zefanja@freenet.de>2014-04-17 09:56:49 +0700
committerzefanja <zefanja@freenet.de>2014-04-17 09:56:49 +0700
commit3afed23b3cdbb3b2925df6af5be8d58cb6d3637f (patch)
tree04cac00a72f64f508b54956959f0dccc6d34ccf3
parent339fc68000afa75cadd361e4b6d19d232c309ea0 (diff)
downloadbiblez-ng-3afed23b3cdbb3b2925df6af5be8d58cb6d3637f.tar.gz
* fixed bug with showing personal notes
-rw-r--r--biblez.appcache2
-rw-r--r--manifest.deploy2
-rw-r--r--manifest.desktop2
-rw-r--r--source/main.js18
4 files changed, 13 insertions, 11 deletions
diff --git a/biblez.appcache b/biblez.appcache
index cb97b5c..67add2c 100644
--- a/biblez.appcache
+++ b/biblez.appcache
@@ -1,5 +1,5 @@
CACHE MANIFEST
-# v14 - 2014-04-16
+# v15 - 2014-04-17
CACHE:
icon.png
index.html
diff --git a/manifest.deploy b/manifest.deploy
index 5094c25..0c43c1c 100644
--- a/manifest.deploy
+++ b/manifest.deploy
@@ -1,6 +1,6 @@
{
"name": "BibleZ",
- "version": "1.3.5",
+ "version": "1.3.6",
"description": "BibleZ is an easy to use offline bible reader app for your FirefoxOS device! 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": "/index.html",
"icons": {
diff --git a/manifest.desktop b/manifest.desktop
index d5befac..0fe83ba 100644
--- a/manifest.desktop
+++ b/manifest.desktop
@@ -1,6 +1,6 @@
{
"name": "BibleZ",
- "version": "1.3.5",
+ "version": "1.3.6",
"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 f583bc9..fa1c4d1 100644
--- a/source/main.js
+++ b/source/main.js
@@ -77,7 +77,7 @@ enyo.kind({
{name: "verseList", kind: "VerseList", touch: false, thumb: false, touchOverscroll: false, count: 0, onSetupItem: "setVerses", onScroll: "handleOnScroll", classes: "enyo-selectable", components: [
{name: "text", allowHtml: true, style: "display: inline;", ontap: "handleVerseTap", onclick: "handleVerseTap"},
{name: "imgBm", tag: "img", style: "display: inline;", showing: false, src: "assets/bookmark.png"},
- {name: "imgNote", tag: "img", type: "note", style: "display: inline; margin: 0 3px;", showing: false, src: "assets/note.png", ontap: "handleVerseTap"}
+ {name: "imgNote", content: "", allowHtml: true, style: "display: inline; margin: 0 3px;", showing: false, ontap: "handleVerseTap", onclick: "handleVerseTap"}
]}
/*{},
@@ -354,9 +354,10 @@ enyo.kind({
else
this.$.imgBm.hide();
//Notes
- if(item.note)
+ if(item.note) {
+ this.$.imgNote.setContent("<a href='?type=note&osisRef=" + item.osisRef + "&noteId=" + item.noteId + "'><img src='assets/note.png'></a>");
this.$.imgNote.show();
- else
+ } else
this.$.imgNote.hide();
//Highlights
if(item.highlight)
@@ -434,7 +435,7 @@ enyo.kind({
api.getNotes(noteKeys, enyo.bind(this, function (inError, inNotes) {
if(!inError) {
inNotes.forEach(enyo.bind(this, function (note) {
- this.updateVerses(note.osisRef, {note: true, type: "note", noteId: note.id});
+ this.updateVerses(note.osisRef, {note: true, type: "note", osisRef: note.osisRef, noteId: note.id});
}));
} else
this.handleError(inError);
@@ -531,6 +532,7 @@ enyo.kind({
attributes[item[0]] = item[1];
});
}
+ //console.log(attributes);
if(attributes.type === "verseNum") {
this.$.versePopup.setOsisRef(attributes.osisRef);
if(this.userData.hasOwnProperty(attributes.osisRef)) {
@@ -560,14 +562,14 @@ enyo.kind({
this.$.versePopup.setLabels();
this.$.versePopup.showAtEvent(inEvent);
} else if (attributes.type === "note") {
- /*api.getNote(parseInt(attributes.noteId, 10), enyo.bind(this, function (inError, inNote) {
+ api.getNote(parseInt(attributes.noteId, 10), enyo.bind(this, function (inError, inNote) {
if(!inError) {
this.$.notePopup.setText(inNote.text);
this.$.notePopup.setOsisRef(inNote.osisRef);
this.$.notePopup.showAtEvent(inEvent);
} else
this.handleError(inError);
- }));*/
+ }));
} else if (attributes.type === "footnote") {
this.footnotes[attributes.osisRef].forEach(enyo.bind(this, function(item) {
if(item.n === attributes.n)
@@ -596,7 +598,7 @@ enyo.kind({
}
//Handle user notes
- if(inSender.type === "note") {
+ /*if(inSender.type === "note") {
api.getNote(parseInt(this.verses[inEvent.index].noteId, 10), enyo.bind(this, function (inError, inNote) {
if(!inError) {
this.$.notePopup.setText(inNote.text);
@@ -605,7 +607,7 @@ enyo.kind({
} else
this.handleError(inError);
}));
- }
+ }*/
return false;
},