From f9640262a60769addc924adc14765beea69de37c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 31 Jan 2014 11:08:38 -0500 Subject: [PATCH] refactor(dom) retFunc -> bind --- lib/client/dom.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index e6fec1a0..d9cfc9fb 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -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;