mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 18:23:35 +00:00
feature(cloudcmd) add --html-dialogs
This commit is contained in:
parent
d9c67255a3
commit
a7933b755c
37 changed files with 1271 additions and 141 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue