Fix comment mode (send event onDocumentStateChange)
This commit is contained in:
parent
810588e2e6
commit
3658506052
|
@ -1168,6 +1168,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
|
||||
},
|
||||
|
||||
applyModeEditorElements: function() {
|
||||
|
@ -1225,7 +1226,6 @@ define([
|
|||
|
||||
me.api.asc_SetViewRulers(!Common.localStorage.getBool('de-hidden-rulers'));
|
||||
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
|
@ -1536,8 +1536,7 @@ define([
|
|||
this.updateWindowTitle();
|
||||
|
||||
var toolbarView = this.getApplication().getController('Toolbar').getView();
|
||||
|
||||
if (toolbarView && !toolbarView._state.previewmode) {
|
||||
if (toolbarView && toolbarView.btnCollabChanges && !toolbarView._state.previewmode) {
|
||||
var isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'),
|
||||
forcesave = this.appOptions.forcesave,
|
||||
isDisabled = !isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave;
|
||||
|
|
|
@ -912,6 +912,7 @@ define([
|
|||
|
||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
|
||||
},
|
||||
|
||||
applyModeEditorElements: function(prevmode) {
|
||||
|
@ -974,7 +975,6 @@ define([
|
|||
if (me.api.asc_SetViewRulers) me.api.asc_SetViewRulers(!Common.localStorage.getBool('pe-hidden-rulers', true));
|
||||
|
||||
me.api.asc_registerCallback('asc_onChangeObjectLock', _.bind(me._onChangeObjectLock, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
/** coauthoring begin **/
|
||||
me.api.asc_registerCallback('asc_onCollaborativeChanges', _.bind(me.onCollaborativeChanges, me));
|
||||
|
@ -1286,7 +1286,7 @@ define([
|
|||
this.updateWindowTitle();
|
||||
|
||||
var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar');
|
||||
if (toolbarView) {
|
||||
if (toolbarView && toolbarView.btnCollabChanges) {
|
||||
var isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'),
|
||||
forcesave = this.appOptions.forcesave,
|
||||
isDisabled = !isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave;
|
||||
|
|
|
@ -734,7 +734,6 @@ define([
|
|||
|
||||
rightmenuController.createDelayedElements();
|
||||
|
||||
me.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(me.onDocumentModifiedChanged, me));
|
||||
me.api.asc_registerCallback('asc_onDocumentCanSaveChanged', _.bind(me.onDocumentCanSaveChanged, me));
|
||||
me.api.asc_registerCallback('asc_OnTryUndoInFastCollaborative',_.bind(me.onTryUndoInFastCollaborative, me));
|
||||
me.onDocumentModifiedChanged(me.api.asc_isDocumentModified());
|
||||
|
@ -961,6 +960,7 @@ define([
|
|||
if (!this.appOptions.isEditMailMerge && !this.appOptions.isEditDiagram) {
|
||||
this.api.asc_registerCallback('asc_onSendThemeColors', _.bind(this.onSendThemeColors, this));
|
||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||
this.api.asc_registerCallback('asc_onDocumentModifiedChanged', _.bind(this.onDocumentModifiedChanged, this));
|
||||
|
||||
var printController = app.getController('Print');
|
||||
printController && this.api && printController.setApi(this.api);
|
||||
|
|
Loading…
Reference in a new issue