diff --git a/lib/client/dom.js b/lib/client/dom.js index 7b00e786..34725505 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -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); diff --git a/lib/client/load.js b/lib/client/load.js index e06cbbe6..18ba2606 100644 --- a/lib/client/load.js +++ b/lib/client/load.js @@ -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); };