diff options
Diffstat (limited to 'source/popup.js')
-rw-r--r-- | source/popup.js | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/source/popup.js b/source/popup.js index b0cd1ce..fdca7bc 100644 --- a/source/popup.js +++ b/source/popup.js @@ -1,3 +1,4 @@ +// VERSE POPUP // enyo.kind({ name: "biblez.versePopup", kind: "onyx.Popup", @@ -8,7 +9,8 @@ enyo.kind({ events: { onBookmark: "", onNote: "", - onHighlight: "" + onHighlight: "", + onNoteTap: "" }, published: { osisRef: null, @@ -82,9 +84,16 @@ enyo.kind({ else console.log(inError); })); + }, + + handleNote: function (inSender, inEvent) { + this.hide(); + this.doNoteTap({osisRef: this.osisRef, noteId: this.noteId}); } }); +// FONT MENU // + enyo.kind({ name: "biblez.fontMenu", kind: "onyx.Popup", @@ -169,4 +178,31 @@ enyo.kind({ fontChanged: function(inSender, inEvent) { this.$[this.font].setActive(true); } +}); + +// NOTE VIEW POPUP // +enyo.kind({ + name: "biblez.notePopup", + kind: "onyx.Popup", + classes: "note-popup", + events: { + onEdit: "" + }, + published: { + osisRef: null, + text: "" + }, + components:[ + {kind: "enyo.Scroller", touch: true, fit: true, components: [ + {name: "noteText", content: "", allowHtml: true, ontap: "handleTap"} + ]} + ], + + textChanged: function () { + this.$.noteText.setContent(this.text); + }, + + handleTap: function (inSender, inEvent) { + this.doEdit({osisRef: this.osisRef}); + } });
\ No newline at end of file |