mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
feature(dom) showError: isQuiet
This commit is contained in:
parent
b9523dfa65
commit
749838e479
2 changed files with 6 additions and 3 deletions
|
|
@ -114,7 +114,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
/**
|
||||
* show error image (usualy after error on ajax request)
|
||||
*/
|
||||
this.showError = function(jqXHR) {
|
||||
this.showError = function(jqXHR, isQuiet) {
|
||||
var isStr = Util.isString(jqXHR),
|
||||
image = Images.error(),
|
||||
response = '',
|
||||
|
|
@ -137,7 +137,9 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
if (text)
|
||||
setTimeout(function() {
|
||||
Dialog.alert(text);
|
||||
if (!isQuiet)
|
||||
Dialog.alert(text);
|
||||
|
||||
Util.log(text);
|
||||
}, 100);
|
||||
|
||||
|
|
|
|||
|
|
@ -51,13 +51,14 @@ var Util, DOM;
|
|||
|
||||
funcError = function() {
|
||||
var template = 'file {{ src }} could not be loaded',
|
||||
isQuit = !!onError,
|
||||
msg = Util.render(template, {
|
||||
src: p.src
|
||||
});
|
||||
|
||||
parent.removeChild(element);
|
||||
|
||||
Images.showError(msg);
|
||||
Images.showError(msg, isQuit);
|
||||
|
||||
Util.exec(onError);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue