[SSE] Fix Bug 46122, Bug 46083
This commit is contained in:
parent
0851ee9036
commit
417a1767ef
|
@ -71,11 +71,14 @@ define([
|
||||||
'insertpivot': this.onInsertPivot
|
'insertpivot': this.onInsertPivot
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 1);
|
||||||
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-pivot", 1);
|
||||||
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-spark", 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
onLaunch: function() {
|
onLaunch: function() {
|
||||||
this.rightmenu = this.createView('RightMenu');
|
this.rightmenu = this.createView('RightMenu');
|
||||||
|
|
||||||
this.rightmenu.on('render:after', _.bind(this.onRightMenuAfterRender, this));
|
this.rightmenu.on('render:after', _.bind(this.onRightMenuAfterRender, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -111,15 +114,17 @@ define([
|
||||||
if (!minimized && this.editMode) {
|
if (!minimized && this.editMode) {
|
||||||
if (event) { // user click event
|
if (event) { // user click event
|
||||||
if (type == Common.Utils.documentSettingsType.Table) {
|
if (type == Common.Utils.documentSettingsType.Table) {
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 1);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 2);
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Chart].hidden)
|
if (!this._settings[Common.Utils.documentSettingsType.Chart].hidden) {
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-spark", 0);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-spark", Math.min(Common.Utils.InternalSettings.get("sse-rightpanel-active-spark"), 1));
|
||||||
|
}
|
||||||
} else if (type == Common.Utils.documentSettingsType.Pivot)
|
} else if (type == Common.Utils.documentSettingsType.Pivot)
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-pivot", 1);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-pivot", 1);
|
||||||
else if (type == Common.Utils.documentSettingsType.Chart && !this._settings[Common.Utils.documentSettingsType.Cell].hidden) {//sparkline
|
else if (type == Common.Utils.documentSettingsType.Chart && !this._settings[Common.Utils.documentSettingsType.Cell].hidden) {//sparkline
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-spark", 1);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-spark", 2);
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden)
|
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden) {
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 0);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", Math.min(Common.Utils.InternalSettings.get("sse-rightpanel-active-table"), 1));
|
||||||
|
}
|
||||||
} else if (Common.Utils.documentSettingsType.Cell) {
|
} else if (Common.Utils.documentSettingsType.Cell) {
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden)
|
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden)
|
||||||
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 0);
|
Common.Utils.InternalSettings.set("sse-rightpanel-active-table", 0);
|
||||||
|
@ -269,15 +274,21 @@ define([
|
||||||
if (priorityactive<0 && !this._settings[Common.Utils.documentSettingsType.Cell].hidden &&
|
if (priorityactive<0 && !this._settings[Common.Utils.documentSettingsType.Cell].hidden &&
|
||||||
(!this._settings[Common.Utils.documentSettingsType.Table].hidden || !this._settings[Common.Utils.documentSettingsType.Pivot].hidden ||
|
(!this._settings[Common.Utils.documentSettingsType.Table].hidden || !this._settings[Common.Utils.documentSettingsType.Pivot].hidden ||
|
||||||
!this._settings[Common.Utils.documentSettingsType.Chart].hidden)) {
|
!this._settings[Common.Utils.documentSettingsType.Chart].hidden)) {
|
||||||
var tableactive = !!Common.Utils.InternalSettings.get("sse-rightpanel-active-table") && !this._settings[Common.Utils.documentSettingsType.Table].hidden,
|
var tableactive = Common.Utils.InternalSettings.get("sse-rightpanel-active-table"),
|
||||||
pivotactive = !!Common.Utils.InternalSettings.get("sse-rightpanel-active-pivot") && !this._settings[Common.Utils.documentSettingsType.Pivot].hidden,
|
pivotactive = Common.Utils.InternalSettings.get("sse-rightpanel-active-pivot"),
|
||||||
sparkactive = !!Common.Utils.InternalSettings.get("sse-rightpanel-active-spark") && !this._settings[Common.Utils.documentSettingsType.Chart].hidden;
|
sparkactive = Common.Utils.InternalSettings.get("sse-rightpanel-active-spark");
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden)
|
if (!this._settings[Common.Utils.documentSettingsType.Table].hidden && !this._settings[Common.Utils.documentSettingsType.Chart].hidden) {
|
||||||
priorityactive = !tableactive ? (sparkactive ? Common.Utils.documentSettingsType.Chart : Common.Utils.documentSettingsType.Cell) : Common.Utils.documentSettingsType.Table;
|
if (tableactive == sparkactive)
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Chart].hidden)
|
priorityactive = (tableactive===0) ? Common.Utils.documentSettingsType.Cell : Common.Utils.documentSettingsType.Chart;
|
||||||
priorityactive = !sparkactive ? (tableactive ? Common.Utils.documentSettingsType.Table : Common.Utils.documentSettingsType.Cell) : Common.Utils.documentSettingsType.Chart;
|
else
|
||||||
|
priorityactive = (tableactive > sparkactive) ? Common.Utils.documentSettingsType.Table : Common.Utils.documentSettingsType.Chart;
|
||||||
|
} else if (!this._settings[Common.Utils.documentSettingsType.Table].hidden) {
|
||||||
|
priorityactive = (tableactive===0) ? Common.Utils.documentSettingsType.Cell : Common.Utils.documentSettingsType.Table;
|
||||||
|
} else if (!this._settings[Common.Utils.documentSettingsType.Chart].hidden) {
|
||||||
|
priorityactive = (sparkactive===0) ? Common.Utils.documentSettingsType.Cell : Common.Utils.documentSettingsType.Chart;
|
||||||
|
}
|
||||||
if (!this._settings[Common.Utils.documentSettingsType.Pivot].hidden)
|
if (!this._settings[Common.Utils.documentSettingsType.Pivot].hidden)
|
||||||
priorityactive = !pivotactive ? Common.Utils.documentSettingsType.Cell : Common.Utils.documentSettingsType.Pivot;
|
priorityactive = (pivotactive===0) ? Common.Utils.documentSettingsType.Cell : Common.Utils.documentSettingsType.Pivot;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priorityactive>-1) active = priorityactive;
|
if (priorityactive>-1) active = priorityactive;
|
||||||
|
|
Loading…
Reference in a new issue