Commit a7e603ca authored by Julia Radzhabova's avatar Julia Radzhabova

[PE] [SSE] Optimization of right panel.

parent bfc91dc9
...@@ -148,14 +148,15 @@ define([ ...@@ -148,14 +148,15 @@ define([
} }
} }
var lastactive = -1, currentactive, priorityactive = -1; var lastactive = -1, currentactive, priorityactive = -1,
activePane = this.rightmenu.GetActivePane();
for (i=0; i<this._settings.length; i++) { for (i=0; i<this._settings.length; i++) {
var pnl = this._settings[i]; var pnl = this._settings[i];
if (pnl===undefined) continue; if (pnl===undefined) continue;
if ( pnl.hidden ) { if ( pnl.hidden ) {
if (!pnl.btn.isDisabled()) pnl.btn.setDisabled(true); if (!pnl.btn.isDisabled()) pnl.btn.setDisabled(true);
if (this.rightmenu.GetActivePane() == pnl.panelId) if (activePane == pnl.panelId)
currentactive = -1; currentactive = -1;
} else { } else {
if (pnl.btn.isDisabled()) pnl.btn.setDisabled(false); if (pnl.btn.isDisabled()) pnl.btn.setDisabled(false);
...@@ -165,7 +166,7 @@ define([ ...@@ -165,7 +166,7 @@ define([
pnl.needShow = false; pnl.needShow = false;
priorityactive = i; priorityactive = i;
} else if ( i != Common.Utils.documentSettingsType.Slide || this.rightmenu._settings[i].isCurrent) { } else if ( i != Common.Utils.documentSettingsType.Slide || this.rightmenu._settings[i].isCurrent) {
if (this.rightmenu.GetActivePane() == pnl.panelId) if (activePane == pnl.panelId)
currentactive = i; currentactive = i;
} }
......
...@@ -254,7 +254,7 @@ define([ ...@@ -254,7 +254,7 @@ define([
}, },
GetActivePane: function() { GetActivePane: function() {
return (this.minimizedMode) ? null : $(".settings-panel.active")[0].id; return (this.minimizedMode) ? null : this.$el.find(".settings-panel.active")[0].id;
}, },
SetDisabled: function(id, disabled, all) { SetDisabled: function(id, disabled, all) {
......
...@@ -177,7 +177,8 @@ define([ ...@@ -177,7 +177,8 @@ define([
this._settings[settingsType].hidden = 0; this._settings[settingsType].hidden = 0;
} }
var lastactive = -1, currentactive, priorityactive = -1; var lastactive = -1, currentactive, priorityactive = -1,
activePane = this.rightmenu.GetActivePane();
for (i=0; i<this._settings.length; ++i) { for (i=0; i<this._settings.length; ++i) {
var pnl = this._settings[i]; var pnl = this._settings[i];
if (pnl===undefined) continue; if (pnl===undefined) continue;
...@@ -185,7 +186,7 @@ define([ ...@@ -185,7 +186,7 @@ define([
if ( pnl.hidden ) { if ( pnl.hidden ) {
if ( !pnl.btn.isDisabled() ) if ( !pnl.btn.isDisabled() )
pnl.btn.setDisabled(true); pnl.btn.setDisabled(true);
if (this.rightmenu.GetActivePane() == pnl.panelId) if (activePane == pnl.panelId)
currentactive = -1; currentactive = -1;
} else { } else {
if ( pnl.btn.isDisabled() ) if ( pnl.btn.isDisabled() )
...@@ -194,7 +195,7 @@ define([ ...@@ -194,7 +195,7 @@ define([
if ( pnl.needShow ) { if ( pnl.needShow ) {
pnl.needShow = false; pnl.needShow = false;
priorityactive = i; priorityactive = i;
} else if (this.rightmenu.GetActivePane() == pnl.panelId) } else if (activePane == pnl.panelId)
currentactive = i; currentactive = i;
pnl.panel.setLocked(pnl.locked); pnl.panel.setLocked(pnl.locked);
} }
......
...@@ -234,7 +234,7 @@ define([ ...@@ -234,7 +234,7 @@ define([
}, },
GetActivePane: function() { GetActivePane: function() {
return (this.minimizedMode) ? null : $(".settings-panel.active")[0].id; return (this.minimizedMode) ? null : this.$el.find(".settings-panel.active")[0].id;
}, },
clearSelection: function() { clearSelection: function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment