Hide save buttons

This commit is contained in:
Julia Radzhabova 2021-11-18 17:46:14 +03:00
parent e95b5fc0e7
commit 4354a26a9b
11 changed files with 16 additions and 13 deletions

View file

@ -151,6 +151,7 @@
close: false / true, // close menu button
settings: false / true, // advanced settings
info: false / true // document info
save: false/true // save button
} / false / true,
home: {
mailmerge: false/true // mail merge button
@ -160,9 +161,11 @@
collaboration: false / true // collaboration tab
protect: false / true, // protect tab
plugins: false / true // plugins tab
save: false/true // save button on toolbar in
},
header: {
users: false/true // users list button
save: false/true // save button
},
leftMenu: {
navigation: false/true,

View file

@ -118,7 +118,7 @@ define([
var templateTitleBox = '<section id="box-document-title">' +
'<div class="extra"></div>' +
'<div class="hedset">' +
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
'<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' +
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' +

View file

@ -2,7 +2,7 @@
<li class="fm-first-item"></li>
<li id="fm-btn-return" class="fm-btn" data-layout-name="toolbar-file-close"></li>
<li class="devider"></li>
<li id="fm-btn-save" class="fm-btn"></li>
<li id="fm-btn-save" class="fm-btn" data-layout-name="toolbar-file-save"></li>
<li id="fm-btn-edit" class="fm-btn"></li>
<li id="fm-btn-download" class="fm-btn"></li>
<li id="fm-btn-save-copy" class="fm-btn"></li>

View file

@ -11,7 +11,7 @@
<span class="btn-slot" id="slot-btn-print"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-save"></span>
<span class="btn-slot" id="slot-btn-save" data-layout-name="toolbar-save"></span>
</div>
</div>
<div class="separator long"></div>

View file

@ -369,12 +369,12 @@ define([
var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false;
this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide']();
this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
this.miSave[this.mode.isEdit?'show':'hide']();
this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide']();
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.miProtect[this.mode.canProtect ?'show':'hide']();
separatorVisible = (this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
separatorVisible = (this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || this.mode.canPrint || this.mode.canProtect ||
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected;
this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide']();
separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider'));

View file

@ -2,7 +2,7 @@
<li class="fm-first-item"></li>
<li id="fm-btn-return" class="fm-btn" data-layout-name="toolbar-file-close"></li>
<li class="devider"></li>
<li id="fm-btn-save" class="fm-btn"></li>
<li id="fm-btn-save" class="fm-btn" data-layout-name="toolbar-file-save"></li>
<li id="fm-btn-edit" class="fm-btn"></li>
<li id="fm-btn-download" class="fm-btn"></li>
<li id="fm-btn-save-copy" class="fm-btn"></li>

View file

@ -11,7 +11,7 @@
<span class="btn-slot" id="slot-btn-print"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-save"></span>
<span class="btn-slot" id="slot-btn-save" data-layout-name="toolbar-save"></span>
</div>
</div>
<div class="separator long"></div>

View file

@ -370,12 +370,12 @@ define([
var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false;
this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide']();
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
this.miSave[this.mode.isEdit?'show':'hide']();
this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide']();
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.miProtect[this.mode.canProtect ?'show':'hide']();
separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
separatorVisible = (this.mode.canDownload || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || this.mode.canPrint || this.mode.canProtect ||
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected;
this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide']();
separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider'));

View file

@ -2,7 +2,7 @@
<li class="fm-first-item"></li>
<li id="fm-btn-return" class="fm-btn" data-layout-name="toolbar-file-close"></li>
<li class="devider"></li>
<li id="fm-btn-save" class="fm-btn"></li>
<li id="fm-btn-save" class="fm-btn" data-layout-name="toolbar-file-save"></li>
<li id="fm-btn-edit" class="fm-btn"></li>
<li id="fm-btn-download" class="fm-btn"></li>
<li id="fm-btn-save-copy" class="fm-btn"></li>

View file

@ -11,7 +11,7 @@
<span class="btn-slot" id="slot-btn-print"></span>
</div>
<div class="elset">
<span class="btn-slot" id="slot-btn-save"></span>
<span class="btn-slot" id="slot-btn-save" data-layout-name="toolbar-save"></span>
</div>
</div>
<div class="separator long"></div>

View file

@ -354,12 +354,12 @@ define([
var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false;
this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide']();
this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
this.miSave[this.mode.isEdit?'show':'hide']();
this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide']();
this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
this.miPrint[this.mode.canPrint?'show':'hide']();
this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
this.miProtect[this.mode.canProtect ?'show':'hide']();
separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect ||
separatorVisible = (this.mode.canDownload || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || this.mode.canPrint || this.mode.canProtect ||
!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected;
this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide']();
separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider'));