diff options
Diffstat (limited to 'source/dataView.js')
-rw-r--r-- | source/dataView.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/dataView.js b/source/dataView.js index 4db82d2..e102995 100644 --- a/source/dataView.js +++ b/source/dataView.js @@ -12,7 +12,8 @@ enyo.kind({ components: [ {name: "messagePopup", kind: "onyx.Popup", centered: true, floating: true, classes: "message-popup"}, {kind: "onyx.MoreToolbar", layoutKind:"FittableColumnsLayout", components: [ - {kind: "onyx.IconButton", src: "assets/back.png", ontap: "handleBack"}, + {name: "btBack", kind: "onyx.IconButton", src: "assets/back.png", ontap: "handleBack"}, + {name: "btHide", kind: "onyx.IconButton", src: "assets/hide.png", showing: false, ontap: "handleBack"}, {kind: "onyx.RadioGroup", onActivate:"sectionActivated", classes: "center", fit: true, defaultKind: "onyx.IconButton", components: [ {name: "rbBm", src: "assets/bookmarksTB.png", section: "bookmarks", style: "margin: 0 10px;"}, {name: "rbNotes", src: "assets/notesTB.png", section: "notes", style: "margin: 0 10px;"}, @@ -32,6 +33,11 @@ enyo.kind({ data: [], + showHideButton: function () { + this.$.btHide.show(); + this.$.btBack.hide(); + }, + sectionActivated: function (inSender, inEvent) { if (inEvent.originator.getActive()) { this.setSection(inEvent.originator.section); @@ -96,15 +102,19 @@ enyo.kind({ setupItem: function(inSender, inEvent) { var data = this.data[inEvent.index]; this.$.itemOsis.setContent(api.formatOsis(data.osisRef)); - if(this.section === "highlights") + if(this.section === "highlights") { this.$.item.applyStyle("background-color", data.color); - else + this.$.itemOsis.addRemoveClass("list-selected-bold", inSender.isSelected(inEvent.index)); + } else { this.$.item.applyStyle("background-color", null); + this.$.itemOsis.addRemoveClass("list-selected-bold", inSender.isSelected(inEvent.index)); + } if(this.section === "notes") this.$.itemText.setContent(data.text); else this.$.itemText.setContent(""); - //this.$.index.setContent(inEvent.index); + this.$.item.addRemoveClass("list-selected", inSender.isSelected(inEvent.index)); + }, handleListTap: function (inSender, inEvent) { |