[DE] Bug with co-editing in strict mode.

This commit is contained in:
Julia Radzhabova 2017-04-19 14:24:23 +03:00
parent ecae264fd3
commit e24c0e4b38
3 changed files with 9 additions and 9 deletions

View file

@ -559,7 +559,7 @@ define([
if (this.api) {
var cansave = this.api.asc_isDocumentCanSave(),
forcesave = this.appOptions.forcesave;
var isSyncButton = $('.btn-icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch');
var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch');
if (toolbarView.btnSave.isDisabled() !== (!cansave && !isSyncButton || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1))
toolbarView.btnSave.setDisabled(!cansave && !isSyncButton || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1);
if (toolbarView.btnSave.isDisabled() !== (!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
@ -1420,7 +1420,7 @@ define([
var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar');
if (toolbarView) {
var isSyncButton = $('.btn-icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
forcesave = this.appOptions.forcesave;
if (toolbarView.btnSave.isDisabled() !== (!isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
toolbarView.btnSave.setDisabled(!isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
@ -1438,7 +1438,7 @@ define([
toolbarView = toolbarController.getView('Toolbar');
if (toolbarView && this.api) {
var isSyncButton = $('.btn-icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
var isSyncButton = $('.icon', toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
forcesave = this.appOptions.forcesave;
if (toolbarView.btnSave.isDisabled() !== (!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
toolbarView.btnSave.setDisabled(!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);

View file

@ -474,7 +474,7 @@ define([
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign;
if (btnHorizontalAlign.rendered) {
var iconEl = $('.btn-icon', btnHorizontalAlign.cmpEl);
var iconEl = $('.icon', btnHorizontalAlign.cmpEl);
if (iconEl) {
iconEl.removeClass(btnHorizontalAlign.options.icls);
@ -853,7 +853,7 @@ define([
onSave: function(e) {
if (this.api) {
var isModified = this.api.asc_isDocumentCanSave();
var isSyncButton = $('.btn-icon', this.toolbar.btnSave.cmpEl).hasClass('btn-synch');
var isSyncButton = $('.icon', this.toolbar.btnSave.cmpEl).hasClass('btn-synch');
if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
return;
@ -1007,7 +1007,7 @@ define([
onMenuHorizontalAlignSelect: function(menu, item) {
this._state.pralign = undefined;
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign,
iconEl = $('.btn-icon', btnHorizontalAlign.cmpEl);
iconEl = $('.icon', btnHorizontalAlign.cmpEl);
if (iconEl) {
iconEl.removeClass(btnHorizontalAlign.options.icls);

View file

@ -2334,7 +2334,7 @@ define([
}
this._state.hasCollaborativeChanges = true;
var iconEl = $('.btn-icon', this.btnSave.cmpEl);
var iconEl = $('.icon', this.btnSave.cmpEl);
iconEl.removeClass(this.btnSaveCls);
iconEl.addClass('btn-synch');
if (this.showSynchTip) {
@ -2369,7 +2369,7 @@ define([
synchronizeChanges: function () {
if (this.btnSave.rendered) {
var iconEl = $('.btn-icon', this.btnSave.cmpEl);
var iconEl = $('.icon', this.btnSave.cmpEl);
if (iconEl.hasClass('btn-synch')) {
iconEl.removeClass('btn-synch');
@ -2395,7 +2395,7 @@ define([
if (cls !== this.btnSaveCls && this.btnSave.rendered) {
this.btnSaveTip = ((length > 1) ? this.tipSaveCoauth : this.tipSave ) + Common.Utils.String.platformKey('Ctrl+S');
var iconEl = $('.btn-icon', this.btnSave.cmpEl);
var iconEl = $('.icon', this.btnSave.cmpEl);
if (!iconEl.hasClass('btn-synch')) {
iconEl.removeClass(this.btnSaveCls);
iconEl.addClass(cls);