feature(dom) showError: isQuiet

This commit is contained in:
coderaiser 2014-05-30 11:05:52 -04:00
parent b9523dfa65
commit 749838e479
2 changed files with 6 additions and 3 deletions

View file

@ -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);

View file

@ -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);
};