[SSE] locked 'pivot table' options for offline files

This commit is contained in:
Maxim Kadushkin 2018-05-17 12:30:13 +03:00
parent 91972b300a
commit 0175dc8e9d
2 changed files with 11 additions and 9 deletions

View file

@ -1000,7 +1000,7 @@ define([
statusbarController.getView('Statusbar').changeViewMode(true);
}
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram)
if (!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram && !me.appOptions.isOffline)
application.getController('PivotTable').setMode(me.appOptions).setConfig({config: me.editorConfig}, me.api);
var viewport = this.getApplication().getController('Viewport').getView('Viewport');

View file

@ -2953,15 +2953,17 @@ define([
me.toolbar.setApi(me.api);
if ( !config.isEditDiagram && !config.isEditMailMerge ) {
var tab = {action: 'pivot', caption: me.textPivot};
var $panel = me.getApplication().getController('PivotTable').createToolbarPanel();
if ( $panel ) {
me.toolbar.addTab(tab, $panel, 3);
me.toolbar.setVisible('pivot', true);
if ( !config.isOffline ) {
tab = {action: 'pivot', caption: me.textPivot};
$panel = me.getApplication().getController('PivotTable').createToolbarPanel();
if ($panel) {
me.toolbar.addTab(tab, $panel, 3);
me.toolbar.setVisible('pivot', true);
}
}
tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
$panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
var tab = {action: 'review', caption: me.toolbar.textTabCollaboration};
var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel();
if ( $panel )
me.toolbar.addTab(tab, $panel, 4);
@ -2978,7 +2980,7 @@ define([
if ( config.isProtectSupport && config.isOffline ) {
tab = {action: 'protect', caption: me.toolbar.textTabProtect};
var $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
$panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel();
if ($panel)
me.toolbar.addTab(tab, $panel, 5);
}