diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index e5d579711..c18fc0334 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -625,7 +625,7 @@ define([ if (this.api && !toolbarView._state.previewmode) { var cansave = this.api.asc_isDocumentCanSave(), forcesave = this.appOptions.forcesave, - isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), isDisabled = !cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; toolbarView.btnSave.setDisabled(isDisabled); } @@ -1534,7 +1534,7 @@ define([ var toolbarView = this.getApplication().getController('Toolbar').getView(); if (toolbarView && this.api && !toolbarView._state.previewmode) { - var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + var isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), forcesave = this.appOptions.forcesave, isDisabled = !isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; toolbarView.btnSave.setDisabled(isDisabled); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index 724d9dfd4..50a46be53 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -426,7 +426,7 @@ define([ if (this.api && this.api.asc_isDocumentCanSave) { var cansave = this.api.asc_isDocumentCanSave(), forcesave = this.appOptions.forcesave, - isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), isDisabled = !cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; toolbarView.btnSave.setDisabled(isDisabled); } @@ -1277,7 +1277,7 @@ define([ onDocumentCanSaveChanged: function (isCanSave) { var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar'); if ( toolbarView ) { - var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + var isSyncButton = toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), forcesave = this.appOptions.forcesave, isDisabled = !isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; toolbarView.btnSave.setDisabled(isDisabled); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 95cc2d548..ec60b1dee 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -1412,8 +1412,8 @@ define([ this.updateWindowTitle(change); Common.Gateway.setDocumentModified(change); - if (this.toolbarView && this.toolbarView.btnSave && this.api) { - var isSyncButton = $('.icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + if (this.toolbarView && this.toolbarView.btnCollabChanges && this.api) { + var isSyncButton = this.toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), forcesave = this.appOptions.forcesave, cansave = this.api.asc_isDocumentCanSave(), isDisabled = !cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; @@ -1422,8 +1422,8 @@ define([ }, onDocumentCanSaveChanged: function (isCanSave) { - if (this.toolbarView && this.toolbarView.btnSave) { - var isSyncButton = $('.icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'), + if (this.toolbarView && this.toolbarView.btnCollabChanges) { + var isSyncButton = this.toolbarView.btnCollabChanges.$icon.hasClass('btn-synch'), forcesave = this.appOptions.forcesave, isDisabled = !isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave; this.toolbarView.btnSave.setDisabled(isDisabled);