refactor(dom) retFunc -> bind

This commit is contained in:
coderaiser 2014-01-31 11:08:38 -05:00
parent 1423afbc66
commit f9640262a6

View file

@ -80,7 +80,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
* show error image (usualy after error on ajax request)
*/
this.showError = function(jqXHR) {
var lLoadingImage = lImages.loading(),
var func,
lLoadingImage = lImages.loading(),
lErrorImage = lImages.error(),
lResponse = '',
lStatusText = '',
@ -119,7 +120,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
if (lText) {
Util.log(lText);
setTimeout(Util.retFunc(Dialog.alert, lText), 100);
func = Dialog.alert.bind(null, lText);
setTimeout(func, 100);
}
return lErrorImage;