[PE][SSE] Added print, save, undo, redo buttons and user name to header panel.
This commit is contained in:
parent
bb36c63c13
commit
fc6504f5ac
|
@ -284,6 +284,7 @@ define([
|
|||
|
||||
appHeader = this.getApplication().getController('Viewport').getView('Common.Views.Header');
|
||||
appHeader.setCanBack(this.appOptions.canBackToFolder === true);
|
||||
appHeader.setUserName(this.appOptions.user);
|
||||
|
||||
if (this.editorConfig.lang)
|
||||
this.api.asc_setLocale(this.editorConfig.lang);
|
||||
|
|
|
@ -132,6 +132,11 @@ define([
|
|||
var _main = this.getApplication().getController('Main');
|
||||
_main.onPrint();
|
||||
},
|
||||
'save': function (opts) {
|
||||
this.api.asc_Save();
|
||||
},
|
||||
'undo': this.onUndo,
|
||||
'redo': this.onRedo,
|
||||
'downloadas': function (opts) {
|
||||
var _main = this.getApplication().getController('Main');
|
||||
var _file_type = _main.document.fileType,
|
||||
|
|
|
@ -5,7 +5,14 @@
|
|||
</section>
|
||||
<div id="viewport-vbox-layout" class="layout-ct vbox">
|
||||
<section id="box-document-title" class="layout-item">
|
||||
<div class="hedset">
|
||||
<div class="btn-slot" id="slot-btn-dt-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>
|
||||
</div>
|
||||
<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false">
|
||||
<label id="title-user-name"></label>
|
||||
</section>
|
||||
<div id="toolbar" class="layout-item"></div>
|
||||
<div class="layout-item middle">
|
||||
|
|
|
@ -1411,6 +1411,12 @@ define([
|
|||
this.lockControls.push(btnsave);
|
||||
btnsave.setDisabled(this.btnsSave[0].isDisabled());
|
||||
}
|
||||
btnsave = PE.getController('Viewport').getView('Common.Views.Header').getButton('save');
|
||||
if (btnsave && this.btnsSave) {
|
||||
this.btnsSave.push(btnsave);
|
||||
this.lockControls.push(btnsave);
|
||||
btnsave.setDisabled(this.btnsSave[0].isDisabled());
|
||||
}
|
||||
|
||||
/** coauthoring begin **/
|
||||
this.showSynchTip = !Common.localStorage.getBool('pe-hide-synch');
|
||||
|
|
|
@ -305,6 +305,7 @@ define([
|
|||
|
||||
this.headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
|
||||
this.headerView.setCanBack(this.appOptions.canBackToFolder === true);
|
||||
this.headerView.setUserName(this.appOptions.user);
|
||||
|
||||
var value = Common.localStorage.getItem("sse-settings-reg-settings");
|
||||
if (value!==null)
|
||||
|
|
|
@ -83,6 +83,11 @@ define([
|
|||
var _main = this.getApplication().getController('Main');
|
||||
_main.onPrint();
|
||||
},
|
||||
'save': function (opts) {
|
||||
this.api.asc_Save();
|
||||
},
|
||||
'undo': this.onUndo,
|
||||
'redo': this.onRedo,
|
||||
'downloadas': function (opts) {
|
||||
var _main = this.getApplication().getController('Main');
|
||||
var _file_type = _main.appOptions.spreadsheet.fileType,
|
||||
|
|
|
@ -1,11 +1,18 @@
|
|||
<div class="layout-region">
|
||||
<div id="viewport-vbox-layout" class="layout-ct vbox">
|
||||
<section id="box-document-title" class="layout-item">
|
||||
<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false">
|
||||
</section>
|
||||
<section class="layout-ct">
|
||||
<div id="file-menu-panel" class="toolbar-fullview-panel" style="display:none;"></div>
|
||||
</section>
|
||||
<section id="box-document-title" class="layout-item">
|
||||
<div class="hedset">
|
||||
<div class="btn-slot" id="slot-btn-dt-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>
|
||||
</div>
|
||||
<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false">
|
||||
<label id="title-user-name"></label>
|
||||
</section>
|
||||
<div id="toolbar" class="layout-item"></div>
|
||||
<div class="layout-item">
|
||||
<div id="viewport-hbox-layout" class="layout-ct hbox">
|
||||
|
|
|
@ -1723,6 +1723,11 @@ define([
|
|||
this.btnsSave.push(btnsave);
|
||||
btnsave.setDisabled(this.btnsSave[0].isDisabled());
|
||||
}
|
||||
btnsave = SSE.getController('Viewport').getView('Common.Views.Header').getButton('save');
|
||||
if (btnsave && this.btnsSave) {
|
||||
this.btnsSave.push(btnsave);
|
||||
btnsave.setDisabled(this.btnsSave[0].isDisabled());
|
||||
}
|
||||
},
|
||||
|
||||
onToolbarAfterRender: function(toolbar) {
|
||||
|
|
Loading…
Reference in a new issue