[DE] Fix bug 33051
This commit is contained in:
parent
e7589a5f3e
commit
bf566734ee
|
@ -209,6 +209,7 @@ Ext.define('DE.controller.Main', {
|
||||||
|
|
||||||
onLongActionEnd: function(type) {
|
onLongActionEnd: function(type) {
|
||||||
Ext.Viewport.unmask();
|
Ext.Viewport.unmask();
|
||||||
|
Common.Gateway.setDocumentModified(this.api.isDocumentModified());
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: function(id, level, errData) {
|
onError: function(id, level, errData) {
|
||||||
|
|
|
@ -166,6 +166,7 @@ Ext.define('DE.controller.toolbar.Edit', {
|
||||||
this.api.asc_registerCallback('asc_onCanUndo', Ext.bind(this.onApiCanUndo, this));
|
this.api.asc_registerCallback('asc_onCanUndo', Ext.bind(this.onApiCanUndo, this));
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', Ext.bind(this.onCoAuthoringDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', Ext.bind(this.onCoAuthoringDisconnect, this));
|
||||||
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', Ext.bind(this.onApiDocumentModified, this));
|
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', Ext.bind(this.onApiDocumentModified, this));
|
||||||
|
this.api.asc_registerCallback('asc_onDocumentCanSaveChanged', Ext.bind(this.onApiDocumentCanSaveChanged, this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -199,7 +200,7 @@ Ext.define('DE.controller.toolbar.Edit', {
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiDocumentModified: function() {
|
onApiDocumentModified: function() {
|
||||||
var isModified = this.api.isDocumentModified();
|
var isModified = this.api.asc_isDocumentCanSave();
|
||||||
if (this.isDocModified !== isModified) {
|
if (this.isDocModified !== isModified) {
|
||||||
if (this.getSaveButton()) {
|
if (this.getSaveButton()) {
|
||||||
this.getSaveButton().setDisabled(!isModified);
|
this.getSaveButton().setDisabled(!isModified);
|
||||||
|
@ -210,6 +211,12 @@ Ext.define('DE.controller.toolbar.Edit', {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onApiDocumentCanSaveChanged: function (isCanSave) {
|
||||||
|
if (this.getSaveButton()) {
|
||||||
|
this.getSaveButton().setDisabled(!isCanSave);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
showToolbarPanel: function(panel, button){
|
showToolbarPanel: function(panel, button){
|
||||||
if (panel && button){
|
if (panel && button){
|
||||||
panel.on('hide', Ext.bind(function(){
|
panel.on('hide', Ext.bind(function(){
|
||||||
|
|
Loading…
Reference in a new issue