refactor(dom) getPanel

This commit is contained in:
coderaiser 2015-01-08 12:54:25 -05:00
parent e3e79062fd
commit 18594919e2

View file

@ -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);