feature(cloudcmd) add --html-dialogs

This commit is contained in:
coderaiser 2015-09-28 11:43:03 -04:00
parent d9c67255a3
commit a7933b755c
37 changed files with 1271 additions and 141 deletions

View file

@ -21,6 +21,8 @@
COPY = 'copy',
CUT = 'cut',
TITLE = 'Buffer',
Buffer = {
cut : callIfEnabled.bind(null, cut),
copy : callIfEnabled.bind(null, copy),
@ -56,7 +58,7 @@
function isEnabled(callback) {
Files.get('config', function(error, config) {
if (error)
Dialog.alert(error);
Dialog.alert(TITLE, error);
else
callback(config.buffer);
});
@ -67,7 +69,7 @@
if (is)
callback();
else
Dialog.alert('Buffer disabled in config!');
Dialog.alert(TITLE, 'Buffer disabled in config!');
});
}
@ -127,13 +129,13 @@
error = 'Buffer is empty!';
if (error) {
DOM.Dialog.alert(error);
Dialog.alert(TITLE, error);
} else {
data = json.parse(opData);
data.to = path;
if (data.from === path) {
Dialog.alert(msg);
Dialog.alert(TITLE, msg);
} else {
Operation.show(opStr, data);
clear();