aboutsummaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/App.css3
-rw-r--r--source/dataView.js20
-rw-r--r--source/main.js6
3 files changed, 22 insertions, 7 deletions
diff --git a/source/App.css b/source/App.css
index 20fa076..ee0377d 100644
--- a/source/App.css
+++ b/source/App.css
@@ -239,7 +239,6 @@ h3, h1 {
font-size: 0.9em;
}
-/* OVERRIDE SOME ONYX SETTINGS */
-.onyx-toolbar {
+.main-toolbar {
padding: 5px;
} \ No newline at end of file
diff --git a/source/dataView.js b/source/dataView.js
index 03995ae..c9444a8 100644
--- a/source/dataView.js
+++ b/source/dataView.js
@@ -19,6 +19,7 @@ enyo.kind({
{name: "rbHl", src: "assets/highlightsTB.png", section: "highlights", style: "margin: 0 10px;"}
]},
]},
+ {name: "noData", classes: "center", style: "margin-top: 10px;", showing: false},
{name: "dataList", kind: "List", fit: true, touch: true, onSetupItem: "setupItem", components: [
{name: "item", classes: "item", ontap: "handleListTap", components: [
{kind: "enyo.FittableRows", components: [
@@ -33,9 +34,9 @@ enyo.kind({
sectionActivated: function (inSender, inEvent) {
if (inEvent.originator.getActive()) {
- this.section = inEvent.originator.section;
- this.sectionChanged();
+ this.setSection(inEvent.originator.section);
}
+ return true;
},
sectionChanged: function (inSender, inEvent) {
@@ -45,6 +46,11 @@ enyo.kind({
if(!inError) {
this.data = inData;
this.$.dataList.setCount(this.data.length);
+ if(this.data.length === 0) {
+ this.$.noData.show();
+ this.$.noData.setContent($L("No Bookmarks.") + " " + $L("Tap on a verse number to add one."));
+ } else
+ this.$.noData.hide();
this.$.dataList.refresh();
} else
this.handleError(inError);
@@ -55,6 +61,11 @@ enyo.kind({
if(!inError) {
this.data = inData;
this.$.dataList.setCount(this.data.length);
+ if(this.data.length === 0) {
+ this.$.noData.show();
+ this.$.noData.setContent($L("No Bookmarks.") + " " + $L("Tap on a verse number to add one."));
+ } else
+ this.$.noData.hide();
this.$.dataList.refresh();
} else
this.handleError(inError);
@@ -64,6 +75,11 @@ enyo.kind({
api.getAllHighlights(enyo.bind(this, function (inError, inData) {
if(!inError) {
this.data = inData;
+ if(this.data.length === 0) {
+ this.$.noData.show();
+ this.$.noData.setContent($L("No Bookmarks.") + " " + $L("Tap on a verse number to add one."));
+ } else
+ this.$.noData.hide();
this.$.dataList.setCount(this.data.length);
this.$.dataList.refresh();
} else
diff --git a/source/main.js b/source/main.js
index abb6f17..76a3305 100644
--- a/source/main.js
+++ b/source/main.js
@@ -23,7 +23,7 @@ enyo.kind({
{name: "bcPopup", classes: "biblez-bc-popup", kind: "onyx.Popup", modal: true, floating: true, components: [
{kind: "biblez.bcSelector", name: "bcSelector", onSelect: "passageChanged", onBack: "closePopup"}
]},
- {kind: "onyx.MoreToolbar", showing: false, name: "topTB", components: [
+ {kind: "onyx.MoreToolbar", showing: false, classes: "main-toolbar", name: "topTB", components: [
{name: "moduleSelector", kind: "onyx.MenuDecorator", onSelect: "moduleSelected", components: [
{kind: "onyx.Button", name: "btnModules", classes: "tb-button", style: "background-color: #934A15;"},
{kind: "onyx.Menu", maxHeight: "400", name: "moduleMenu"}
@@ -56,8 +56,7 @@ enyo.kind({
]}
]}
]},
- {fit: true},
- {name: "btFont", kind: "onyx.IconButton", src: "assets/font.png", ontap: "handleFontMenu"},
+ {name: "btFont", kind: "onyx.IconButton", src: "assets/font.png", ontap: "handleFontMenu", style: "position:absolute; right: 0;"},
//{name: "btnPrefs", kind:"onyx.IconButton", src: "assets/settings.png", ontap: "handlePrefs"},
//{name: "plus", kind: "onyx.IconButton", src: "assets/add.png", style:"position:absolute;right:0;", ontap: "doOpenModuleManager"},
/*{kind: "onyx.InputDecorator", components: [
@@ -148,6 +147,7 @@ enyo.kind({
this.$.mainPanel.setIndex(2);
this.$.mainPanel.draggable = true;
this.$.topTB.show();
+ this.$.topTB.reflow();
this.modules = inModules;
this.renderModuleMenu(this.modules);
} else {