From 18594919e26247f8f449310c196794030b20c2b2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 8 Jan 2015 12:54:25 -0500 Subject: [PATCH] refactor(dom) getPanel --- lib/client/dom.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index b3104dea..b627d6e1 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -696,7 +696,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; * get not current direcotory path */ this.getNotCurrentDirPath = function() { - var panel = this.getPanel(true), + var panel = this.getPanel(), path = this.getCurrentDirPath(panel); return path; @@ -1405,12 +1405,12 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; /** * shows panel right or left (or active) */ - this.showPanel = function(pActive) { - var ret = true, - lPanel = this.getPanel(pActive); + this.showPanel = function(active) { + var ret = true, + panel = this.getPanel({active: active}); - if (lPanel) - this.show(lPanel); + if (panel) + this.show(panel); else ret = false; @@ -1420,12 +1420,12 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; /** * hides panel right or left (or active) */ - this.hidePanel = function(pActive) { - var ret = false, - lPanel = this.getPanel(pActive); + this.hidePanel = function(active) { + var ret = false, + panel = this.getPanel({active: active}); - if (lPanel) - ret = this.hide(lPanel); + if (panel) + ret = this.hide(panel); return ret; }; @@ -1631,7 +1631,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; DOM.Storage.remove(path, function() { var panel = DOM.getPanel(), - panelPassive = DOM.getPanel(true), + panelPassive = DOM.getPanel({active: false}), setCurrent = function() { var current = DOM.getCurrentByName(name); DOM.setCurrentFile(current);