diff options
author | zefanja <zefanja@freenet.de> | 2013-12-30 15:11:13 +0700 |
---|---|---|
committer | zefanja <zefanja@freenet.de> | 2013-12-30 15:11:13 +0700 |
commit | d7323da462a88ca16086261e5b81bb044a2b6d3e (patch) | |
tree | 2abd9c5d2423636650f2944df16182231f601d8b /source/settings.js | |
parent | 1faf09359d347d4ea060a6b1198f07e25b8ed63e (diff) | |
download | biblez-ng-d7323da462a88ca16086261e5b81bb044a2b6d3e.tar.gz |
* moved delete button to settings
Diffstat (limited to 'source/settings.js')
-rw-r--r-- | source/settings.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/settings.js b/source/settings.js index 15086f1..cc8b52f 100644 --- a/source/settings.js +++ b/source/settings.js @@ -21,6 +21,14 @@ enyo.kind({ {name: "tbLinebreak", kind: "onyx.ToggleButton", onChange: "toggleLinebreak"} ]} ]}, + {tag: "br"}, + {kind: "onyx.Groupbox", components: [ + {kind: "onyx.GroupboxHeader", content: $L("Be careful!")}, + {kind: "enyo.FittableColumns", classes: "settings-row", components: [ + {kind: "onyx.Button", content: "Delete all modules!", style: "margin: 0 2px;", ontap: "deleteModules"}, + {kind: "onyx.Button", content: "Delete all app data!", style: "margin: 0 2px;", ontap: "deleteDatabases"} + ]} + ]}, ]} ]} @@ -49,6 +57,14 @@ enyo.kind({ })); }, + deleteModules: function () { + sword.dataMgr.clearDatabase(); + }, + + deleteDatabases: function () { + api.deleteDatabases(); + }, + handleError: function (inMessage) { if (inMessage.message) inMessage = inMessage.message; |