[SSE] Bug with co-editing in strict mode and icons in the toolbar (border button).
This commit is contained in:
parent
be7577dd5b
commit
23bb0084e9
|
@ -1298,7 +1298,7 @@ define([
|
||||||
Common.Gateway.setDocumentModified(change);
|
Common.Gateway.setDocumentModified(change);
|
||||||
|
|
||||||
if (this.toolbarView && this.toolbarView.btnSave && this.api) {
|
if (this.toolbarView && this.toolbarView.btnSave && this.api) {
|
||||||
var isSyncButton = $('.btn-icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
|
var isSyncButton = $('.icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
|
||||||
forcesave = this.appOptions.forcesave;
|
forcesave = this.appOptions.forcesave;
|
||||||
var cansave = this.api.asc_isDocumentCanSave();
|
var cansave = this.api.asc_isDocumentCanSave();
|
||||||
if (this.toolbarView.btnSave.isDisabled() !== (!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
if (this.toolbarView.btnSave.isDisabled() !== (!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
||||||
|
@ -1308,7 +1308,7 @@ define([
|
||||||
|
|
||||||
onDocumentCanSaveChanged: function (isCanSave) {
|
onDocumentCanSaveChanged: function (isCanSave) {
|
||||||
if (this.toolbarView && this.toolbarView.btnSave) {
|
if (this.toolbarView && this.toolbarView.btnSave) {
|
||||||
var isSyncButton = $('.btn-icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
|
var isSyncButton = $('.icon', this.toolbarView.btnSave.cmpEl).hasClass('btn-synch'),
|
||||||
forcesave = this.appOptions.forcesave;
|
forcesave = this.appOptions.forcesave;
|
||||||
if (this.toolbarView.btnSave.isDisabled() !== (!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
if (this.toolbarView.btnSave.isDisabled() !== (!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
||||||
this.toolbarView.btnSave.setDisabled(!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
this.toolbarView.btnSave.setDisabled(!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
||||||
|
|
|
@ -331,7 +331,7 @@ define([
|
||||||
onSave: function(e) {
|
onSave: function(e) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
var isModified = this.api.asc_isDocumentCanSave();
|
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)
|
if (!isModified && !isSyncButton && !this.toolbar.mode.forcesave)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ define([
|
||||||
bordersColor = btnBorders.options.borderscolor;
|
bordersColor = btnBorders.options.borderscolor;
|
||||||
|
|
||||||
if (btnBorders.rendered) {
|
if (btnBorders.rendered) {
|
||||||
var iconEl = $('.btn-icon', btnBorders.cmpEl);
|
var iconEl = $('.icon', btnBorders.cmpEl);
|
||||||
|
|
||||||
if (iconEl) {
|
if (iconEl) {
|
||||||
iconEl.removeClass(btnBorders.options.icls);
|
iconEl.removeClass(btnBorders.options.icls);
|
||||||
|
@ -575,7 +575,7 @@ define([
|
||||||
|
|
||||||
onHorizontalAlignMenu: function(menu, item) {
|
onHorizontalAlignMenu: function(menu, item) {
|
||||||
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign,
|
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign,
|
||||||
iconEl = $('.btn-icon', btnHorizontalAlign.cmpEl);
|
iconEl = $('.icon', btnHorizontalAlign.cmpEl);
|
||||||
|
|
||||||
if (iconEl) {
|
if (iconEl) {
|
||||||
iconEl.removeClass(btnHorizontalAlign.options.icls);
|
iconEl.removeClass(btnHorizontalAlign.options.icls);
|
||||||
|
@ -595,7 +595,7 @@ define([
|
||||||
|
|
||||||
onVerticalAlignMenu: function(menu, item) {
|
onVerticalAlignMenu: function(menu, item) {
|
||||||
var btnVerticalAlign = this.toolbar.btnVerticalAlign,
|
var btnVerticalAlign = this.toolbar.btnVerticalAlign,
|
||||||
iconEl = $('.btn-icon', btnVerticalAlign.cmpEl);
|
iconEl = $('.icon', btnVerticalAlign.cmpEl);
|
||||||
|
|
||||||
if (iconEl) {
|
if (iconEl) {
|
||||||
iconEl.removeClass(btnVerticalAlign.options.icls);
|
iconEl.removeClass(btnVerticalAlign.options.icls);
|
||||||
|
@ -1891,7 +1891,7 @@ define([
|
||||||
|
|
||||||
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign;
|
var btnHorizontalAlign = this.toolbar.btnHorizontalAlign;
|
||||||
if (btnHorizontalAlign.rendered) {
|
if (btnHorizontalAlign.rendered) {
|
||||||
var hIconEl = $('.btn-icon', btnHorizontalAlign.cmpEl);
|
var hIconEl = $('.icon', btnHorizontalAlign.cmpEl);
|
||||||
|
|
||||||
if (hIconEl) {
|
if (hIconEl) {
|
||||||
hIconEl.removeClass(btnHorizontalAlign.options.icls);
|
hIconEl.removeClass(btnHorizontalAlign.options.icls);
|
||||||
|
@ -1925,7 +1925,7 @@ define([
|
||||||
|
|
||||||
var btnVerticalAlign = this.toolbar.btnVerticalAlign;
|
var btnVerticalAlign = this.toolbar.btnVerticalAlign;
|
||||||
if (btnVerticalAlign.rendered) {
|
if (btnVerticalAlign.rendered) {
|
||||||
var vIconEl = $('.btn-icon', btnVerticalAlign.cmpEl);
|
var vIconEl = $('.icon', btnVerticalAlign.cmpEl);
|
||||||
|
|
||||||
if (vIconEl) {
|
if (vIconEl) {
|
||||||
vIconEl.removeClass(btnVerticalAlign.options.icls);
|
vIconEl.removeClass(btnVerticalAlign.options.icls);
|
||||||
|
|
|
@ -1478,9 +1478,9 @@ define([
|
||||||
'data-stopPropagation="true"',
|
'data-stopPropagation="true"',
|
||||||
'<% } %>', '>',
|
'<% } %>', '>',
|
||||||
'<label class="title">' + this.textZoom + '</label>',
|
'<label class="title">' + this.textZoom + '</label>',
|
||||||
'<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><span class="btn-icon btn-zoomin"> </span></button>',
|
'<button id="id-menu-zoom-in" type="button" style="float:right; margin: 2px 5px 0 0;" class="btn small btn-toolbar"><span class="icon btn-zoomin"> </span></button>',
|
||||||
'<label class="zoom"><%= options.value %>%</label>',
|
'<label class="zoom"><%= options.value %>%</label>',
|
||||||
'<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><span class="btn-icon btn-zoomout"> </span></button>',
|
'<button id="id-menu-zoom-out" type="button" style="float:right; margin-top: 2px;" class="btn small btn-toolbar"><span class="icon btn-zoomout"> </span></button>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('')),
|
].join('')),
|
||||||
stopPropagation: true,
|
stopPropagation: true,
|
||||||
|
@ -1779,7 +1779,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
this._state.hasCollaborativeChanges = true;
|
this._state.hasCollaborativeChanges = true;
|
||||||
var iconEl = $('.btn-icon', this.btnSave.cmpEl);
|
var iconEl = $('.icon', this.btnSave.cmpEl);
|
||||||
iconEl.removeClass(this.btnSaveCls);
|
iconEl.removeClass(this.btnSaveCls);
|
||||||
iconEl.addClass('btn-synch');
|
iconEl.addClass('btn-synch');
|
||||||
|
|
||||||
|
@ -1815,7 +1815,7 @@ define([
|
||||||
|
|
||||||
synchronizeChanges: function() {
|
synchronizeChanges: function() {
|
||||||
if (this.btnSave.rendered) {
|
if (this.btnSave.rendered) {
|
||||||
var iconEl = $('.btn-icon', this.btnSave.cmpEl);
|
var iconEl = $('.icon', this.btnSave.cmpEl);
|
||||||
|
|
||||||
if (iconEl.hasClass('btn-synch')) {
|
if (iconEl.hasClass('btn-synch')) {
|
||||||
iconEl.removeClass('btn-synch');
|
iconEl.removeClass('btn-synch');
|
||||||
|
@ -1841,7 +1841,7 @@ define([
|
||||||
if (cls !== this.btnSaveCls && this.btnSave.rendered) {
|
if (cls !== this.btnSaveCls && this.btnSave.rendered) {
|
||||||
this.btnSaveTip = ((length>1) ? this.tipSaveCoauth : this.tipSave )+ Common.Utils.String.platformKey('Ctrl+S');
|
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')) {
|
if (!iconEl.hasClass('btn-synch')) {
|
||||||
iconEl.removeClass(this.btnSaveCls);
|
iconEl.removeClass(this.btnSaveCls);
|
||||||
iconEl.addClass(cls);
|
iconEl.addClass(cls);
|
||||||
|
|
Loading…
Reference in a new issue