From 1f0d375d2e91d4a495b96a9d8148ffbdead8b03a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 17 Feb 2014 10:13:32 -0500 Subject: [PATCH] refactor(client) createFileTable --- lib/client.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/client.js b/lib/client.js index b1631ddf..7a3f1300 100644 --- a/lib/client.js +++ b/lib/client.js @@ -415,11 +415,6 @@ var Util, DOM, CloudFunc; panel = DOM.getPanel(), /* getting current element if was refresh */ path = DOM.getCurrentDirPath(panel), - - current = DOM.getCurrentFile(), - dir = DOM.getCurrentDirName(), - - name = DOM.getCurrentName(current), wasRefresh = path === json.path, funcs = [ CloudCmd.getFileTemplate, @@ -428,8 +423,10 @@ var Util, DOM, CloudFunc; ]; Util.asyncCall(funcs, function(templFile, templPath, templLink) { - var n, found, varCurrent, varName, - i = panel.childNodes.length; + var n, found, varCurrent, varName, current, + dir = DOM.getCurrentDirName(), + name = DOM.getCurrentName(), + i = panel.childNodes.length; while(i--) panel.removeChild(panel.lastChild);