commit
f9784a8782
|
@ -386,6 +386,7 @@ define([
|
||||||
var pivotInfo = info.asc_getPivotTableInfo();
|
var pivotInfo = info.asc_getPivotTableInfo();
|
||||||
|
|
||||||
Common.Utils.lockControls(SSE.enumLock.noPivot, !pivotInfo, {array: this.view.lockedControls});
|
Common.Utils.lockControls(SSE.enumLock.noPivot, !pivotInfo, {array: this.view.lockedControls});
|
||||||
|
Common.Utils.lockControls(SSE.enumLock.pivotLock, pivotInfo && (info.asc_getLockedPivotTable()===true), {array: this.view.lockedControls});
|
||||||
Common.Utils.lockControls(SSE.enumLock.editPivot, !!pivotInfo, {array: [this.view.btnAddPivot]});
|
Common.Utils.lockControls(SSE.enumLock.editPivot, !!pivotInfo, {array: [this.view.btnAddPivot]});
|
||||||
|
|
||||||
if (pivotInfo)
|
if (pivotInfo)
|
||||||
|
|
|
@ -111,10 +111,12 @@ define([
|
||||||
|
|
||||||
if (settings.api) {
|
if (settings.api) {
|
||||||
me.api = settings.api;
|
me.api = settings.api;
|
||||||
|
me.wrapEvents = {
|
||||||
|
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
|
||||||
|
};
|
||||||
|
|
||||||
me.api.asc_setSelectionDialogMode(settings.type, settings.range ? settings.range : '');
|
me.api.asc_setSelectionDialogMode(settings.type, settings.range ? settings.range : '');
|
||||||
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
|
||||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
|
||||||
Common.NotificationCenter.trigger('cells:range', settings.type);
|
Common.NotificationCenter.trigger('cells:range', settings.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,8 +179,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose: function(event) {
|
onClose: function(event) {
|
||||||
if (this.api)
|
if (this.api) {
|
||||||
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
||||||
|
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
|
||||||
|
}
|
||||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
||||||
|
|
||||||
SSE.getController('RightMenu').SetDisabled(false);
|
SSE.getController('RightMenu').SetDisabled(false);
|
||||||
|
|
|
@ -156,25 +156,25 @@ define([
|
||||||
|
|
||||||
this.chRowHeader = new Common.UI.CheckBox({
|
this.chRowHeader = new Common.UI.CheckBox({
|
||||||
labelText: this.textRowHeader,
|
labelText: this.textRowHeader,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit]
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chRowHeader);
|
this.lockedControls.push(this.chRowHeader);
|
||||||
|
|
||||||
this.chColHeader = new Common.UI.CheckBox({
|
this.chColHeader = new Common.UI.CheckBox({
|
||||||
labelText: this.textColHeader,
|
labelText: this.textColHeader,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit]
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chColHeader);
|
this.lockedControls.push(this.chColHeader);
|
||||||
|
|
||||||
this.chRowBanded = new Common.UI.CheckBox({
|
this.chRowBanded = new Common.UI.CheckBox({
|
||||||
labelText: this.textRowBanded,
|
labelText: this.textRowBanded,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit]
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chRowBanded);
|
this.lockedControls.push(this.chRowBanded);
|
||||||
|
|
||||||
this.chColBanded = new Common.UI.CheckBox({
|
this.chColBanded = new Common.UI.CheckBox({
|
||||||
labelText: this.textColBanded,
|
labelText: this.textColBanded,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit]
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.chColBanded);
|
this.lockedControls.push(this.chColBanded);
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ define([
|
||||||
iconCls : 'toolbar__icon btn-pivot-layout',
|
iconCls : 'toolbar__icon btn-pivot-layout',
|
||||||
caption : this.capLayout,
|
caption : this.capLayout,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock],
|
||||||
menu : true
|
menu : true
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnPivotLayout);
|
this.lockedControls.push(this.btnPivotLayout);
|
||||||
|
@ -201,7 +201,7 @@ define([
|
||||||
iconCls : 'toolbar__icon btn-blank-rows',
|
iconCls : 'toolbar__icon btn-blank-rows',
|
||||||
caption : this.capBlankRows,
|
caption : this.capBlankRows,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock],
|
||||||
menu : true
|
menu : true
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnPivotBlankRows);
|
this.lockedControls.push(this.btnPivotBlankRows);
|
||||||
|
@ -211,7 +211,7 @@ define([
|
||||||
iconCls : 'toolbar__icon btn-subtotals',
|
iconCls : 'toolbar__icon btn-subtotals',
|
||||||
caption : this.capSubtotals,
|
caption : this.capSubtotals,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock],
|
||||||
menu : true
|
menu : true
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnPivotSubtotals);
|
this.lockedControls.push(this.btnPivotSubtotals);
|
||||||
|
@ -221,7 +221,7 @@ define([
|
||||||
iconCls : 'toolbar__icon btn-grand-totals',
|
iconCls : 'toolbar__icon btn-grand-totals',
|
||||||
caption : this.capGrandTotals,
|
caption : this.capGrandTotals,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock],
|
||||||
menu : true
|
menu : true
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnPivotGrandTotals);
|
this.lockedControls.push(this.btnPivotGrandTotals);
|
||||||
|
@ -231,7 +231,7 @@ define([
|
||||||
iconCls: 'toolbar__icon btn-update',
|
iconCls: 'toolbar__icon btn-update',
|
||||||
caption: this.txtRefresh,
|
caption: this.txtRefresh,
|
||||||
disabled : true,
|
disabled : true,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit]
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock]
|
||||||
});
|
});
|
||||||
this.lockedControls.push(this.btnRefreshPivot);
|
this.lockedControls.push(this.btnRefreshPivot);
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ define([
|
||||||
itemWidth : 61,
|
itemWidth : 61,
|
||||||
itemHeight : 49,
|
itemHeight : 49,
|
||||||
menuMaxHeight : 300,
|
menuMaxHeight : 300,
|
||||||
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit],
|
lock : [_set.lostConnect, _set.coAuth, _set.noPivot, _set.selRangeEdit, _set.pivotLock],
|
||||||
beforeOpenHandler: function(e) {
|
beforeOpenHandler: function(e) {
|
||||||
var cmp = this,
|
var cmp = this,
|
||||||
menu = cmp.openButton.menu;
|
menu = cmp.openButton.menu;
|
||||||
|
|
|
@ -133,8 +133,10 @@ define([
|
||||||
if (settings.selectionType)
|
if (settings.selectionType)
|
||||||
me.selectionType = settings.selectionType;
|
me.selectionType = settings.selectionType;
|
||||||
|
|
||||||
me.api.asc_unregisterCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
me.wrapEvents = {
|
||||||
me.api.asc_registerCallback('asc_onSelectionRangeChanged', _.bind(me.onApiRangeChanged, me));
|
onApiRangeChanged: _.bind(me.onApiRangeChanged, me)
|
||||||
|
};
|
||||||
|
me.api.asc_registerCallback('asc_onSelectionRangeChanged', me.wrapEvents.onApiRangeChanged);
|
||||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
|
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.FormatTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,8 +192,10 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onClose: function(event) {
|
onClose: function(event) {
|
||||||
if (this.api)
|
if (this.api) {
|
||||||
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
this.api.asc_setSelectionDialogMode(Asc.c_oAscSelectionDialogType.None);
|
||||||
|
this.api.asc_unregisterCallback('asc_onSelectionRangeChanged', this.wrapEvents.onApiRangeChanged);
|
||||||
|
}
|
||||||
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
Common.NotificationCenter.trigger('cells:range', Asc.c_oAscSelectionDialogType.None);
|
||||||
Common.NotificationCenter.trigger('edit:complete', this);
|
Common.NotificationCenter.trigger('edit:complete', this);
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,8 @@ define([
|
||||||
noSubitems: 'no-subitems',
|
noSubitems: 'no-subitems',
|
||||||
noSlicerSource: 'no-slicer-source',
|
noSlicerSource: 'no-slicer-source',
|
||||||
selSlicer: 'sel-slicer',
|
selSlicer: 'sel-slicer',
|
||||||
cantSort: 'cant-sort'
|
cantSort: 'cant-sort',
|
||||||
|
pivotLock: 'pivot-lock'
|
||||||
};
|
};
|
||||||
|
|
||||||
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
SSE.Views.Toolbar = Common.UI.Mixtbar.extend(_.extend({
|
||||||
|
|
Loading…
Reference in a new issue