mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
fix(buffer) Dialog.alert -> showMessage
This commit is contained in:
parent
2a8d7be8e2
commit
7e1970c598
1 changed files with 8 additions and 5 deletions
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
function BufferProto(Util, DOM, CloudCmd) {
|
||||
var Storage = DOM.Storage,
|
||||
Dialog = DOM.Dialog,
|
||||
Files = DOM.Files,
|
||||
Info = DOM.CurrentInfo,
|
||||
json = Util.json,
|
||||
|
|
@ -30,6 +29,10 @@
|
|||
paste : callIfEnabled.bind(null, paste)
|
||||
};
|
||||
|
||||
function showMessage(msg) {
|
||||
DOM.Dialog.alert(TITLE, msg);
|
||||
}
|
||||
|
||||
function getNames() {
|
||||
var files = DOM.getActiveFiles(),
|
||||
names = DOM.getFilenames(files);
|
||||
|
|
@ -58,7 +61,7 @@
|
|||
function isEnabled(callback) {
|
||||
Files.get('config', function(error, config) {
|
||||
if (error)
|
||||
Dialog.alert(TITLE, error);
|
||||
showMessage(error);
|
||||
else
|
||||
callback(config.buffer);
|
||||
});
|
||||
|
|
@ -69,7 +72,7 @@
|
|||
if (is)
|
||||
callback();
|
||||
else
|
||||
Dialog.alert(TITLE, 'Buffer disabled in config!');
|
||||
showMessage('Buffer disabled in config!');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -129,13 +132,13 @@
|
|||
error = 'Buffer is empty!';
|
||||
|
||||
if (error) {
|
||||
Dialog.alert(TITLE, error);
|
||||
showMessage(error);
|
||||
} else {
|
||||
data = json.parse(opData);
|
||||
data.to = path;
|
||||
|
||||
if (data.from === path) {
|
||||
Dialog.alert(TITLE, msg);
|
||||
showMessage(msg);
|
||||
} else {
|
||||
Operation.show(opStr, data);
|
||||
clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue