[PE] Bug with co-editing in strict mode.
This commit is contained in:
parent
f8cab2bfdf
commit
499785cac5
|
@ -367,7 +367,7 @@ define([
|
||||||
if (this.api && this.api.asc_isDocumentCanSave) {
|
if (this.api && this.api.asc_isDocumentCanSave) {
|
||||||
var cansave = this.api.asc_isDocumentCanSave(),
|
var cansave = this.api.asc_isDocumentCanSave(),
|
||||||
forcesave = this.appOptions.forcesave;
|
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 && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
if (toolbarView.btnSave.isDisabled() !== (!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave))
|
||||||
toolbarView.btnSave.setDisabled(!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
toolbarView.btnSave.setDisabled(!cansave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
||||||
}
|
}
|
||||||
|
@ -1141,7 +1141,7 @@ define([
|
||||||
|
|
||||||
var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar');
|
var toolbarView = this.getApplication().getController('Toolbar').getView('Toolbar');
|
||||||
if (toolbarView) {
|
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;
|
forcesave = this.appOptions.forcesave;
|
||||||
if (toolbarView.btnSave.isDisabled() !== (!isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !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);
|
toolbarView.btnSave.setDisabled(!isModified && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
||||||
|
@ -1152,7 +1152,7 @@ define([
|
||||||
toolbarController = application.getController('Toolbar'),
|
toolbarController = application.getController('Toolbar'),
|
||||||
toolbarView = toolbarController.getView('Toolbar');
|
toolbarView = toolbarController.getView('Toolbar');
|
||||||
if (toolbarView) {
|
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;
|
forcesave = this.appOptions.forcesave;
|
||||||
if (toolbarView.btnSave.isDisabled() !== (!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !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);
|
toolbarView.btnSave.setDisabled(!isCanSave && !isSyncButton && !forcesave || this._state.isDisconnected || this._state.fastCoauth && this._state.usersCount>1 && !forcesave);
|
||||||
|
|
|
@ -460,7 +460,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (btnHorizontalAlign.rendered) {
|
if (btnHorizontalAlign.rendered) {
|
||||||
var iconEl = $('.btn-icon', btnHorizontalAlign.cmpEl);
|
var iconEl = $('.icon', btnHorizontalAlign.cmpEl);
|
||||||
|
|
||||||
if (iconEl) {
|
if (iconEl) {
|
||||||
iconEl.removeClass(btnHorizontalAlign.options.icls);
|
iconEl.removeClass(btnHorizontalAlign.options.icls);
|
||||||
|
@ -493,7 +493,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
if (btnVerticalAlign.rendered) {
|
if (btnVerticalAlign.rendered) {
|
||||||
var iconEl = $('.btn-icon', btnVerticalAlign.cmpEl);
|
var iconEl = $('.icon', btnVerticalAlign.cmpEl);
|
||||||
|
|
||||||
if (iconEl) {
|
if (iconEl) {
|
||||||
iconEl.removeClass(btnVerticalAlign.options.icls);
|
iconEl.removeClass(btnVerticalAlign.options.icls);
|
||||||
|
@ -886,7 +886,7 @@ define([
|
||||||
onSave: function(e) {
|
onSave: function(e) {
|
||||||
if (this.api && this.api.asc_isDocumentCanSave) {
|
if (this.api && this.api.asc_isDocumentCanSave) {
|
||||||
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;
|
||||||
|
|
||||||
|
@ -1015,7 +1015,7 @@ define([
|
||||||
onMenuHorizontalAlignSelect: function(menu, item) {
|
onMenuHorizontalAlignSelect: function(menu, item) {
|
||||||
this._state.pralign = undefined;
|
this._state.pralign = undefined;
|
||||||
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);
|
||||||
|
@ -1032,7 +1032,7 @@ define([
|
||||||
|
|
||||||
onMenuVerticalAlignSelect: function(menu, item) {
|
onMenuVerticalAlignSelect: 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);
|
||||||
|
|
|
@ -72,9 +72,9 @@ define([
|
||||||
'<div id="presentation-preview" style="width:100%; height:100%"></div>',
|
'<div id="presentation-preview" style="width:100%; height:100%"></div>',
|
||||||
'<div id="preview-controls-panel" class="preview-controls" style="position: absolute; bottom: 0;">',
|
'<div id="preview-controls-panel" class="preview-controls" style="position: absolute; bottom: 0;">',
|
||||||
'<div class="preview-group" style="">',
|
'<div class="preview-group" style="">',
|
||||||
'<button id="btn-preview-prev" type="button" class="btn small btn-toolbar"><span class="btn-icon"> </span></button>',
|
'<button id="btn-preview-prev" type="button" class="btn small btn-toolbar"><span class="icon"> </span></button>',
|
||||||
'<button id="btn-preview-play" type="button" class="btn small btn-toolbar"><span class="btn-icon"> </span></button>',
|
'<button id="btn-preview-play" type="button" class="btn small btn-toolbar"><span class="icon"> </span></button>',
|
||||||
'<button id="btn-preview-next" type="button" class="btn small btn-toolbar"><span class="btn-icon"> </span></button>',
|
'<button id="btn-preview-next" type="button" class="btn small btn-toolbar"><span class="icon"> </span></button>',
|
||||||
'<div class="separator"/>',
|
'<div class="separator"/>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="preview-group dropup">',
|
'<div class="preview-group dropup">',
|
||||||
|
@ -86,9 +86,9 @@ define([
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="preview-group" style="">',
|
'<div class="preview-group" style="">',
|
||||||
'<div class="separator"/>',
|
'<div class="separator"/>',
|
||||||
'<button id="btn-preview-fullscreen" type="button" class="btn small btn-toolbar"><span class="btn-icon"> </span></button>',
|
'<button id="btn-preview-fullscreen" type="button" class="btn small btn-toolbar"><span class="icon"> </span></button>',
|
||||||
'<div class="separator fullscreen"/>',
|
'<div class="separator fullscreen"/>',
|
||||||
'<button id="btn-preview-close" type="button" class="btn small btn-toolbar"><span class="btn-icon"> </span></button>',
|
'<button id="btn-preview-close" type="button" class="btn small btn-toolbar"><span class="icon"> </span></button>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>'
|
'</div>'
|
||||||
].join('');
|
].join('');
|
||||||
|
@ -128,7 +128,7 @@ define([
|
||||||
hintAnchor: 'top'
|
hintAnchor: 'top'
|
||||||
});
|
});
|
||||||
this.btnPlay.on('click', _.bind(function(btn) {
|
this.btnPlay.on('click', _.bind(function(btn) {
|
||||||
var iconEl = $('.btn-icon', this.btnPlay.cmpEl);
|
var iconEl = $('.icon', this.btnPlay.cmpEl);
|
||||||
if (iconEl.hasClass('btn-pause')) {
|
if (iconEl.hasClass('btn-pause')) {
|
||||||
iconEl.removeClass('btn-pause');
|
iconEl.removeClass('btn-pause');
|
||||||
this.btnPlay.updateHint(this.txtPlay);
|
this.btnPlay.updateHint(this.txtPlay);
|
||||||
|
@ -234,7 +234,7 @@ define([
|
||||||
if (Common.Utils.isIE) { // for tooltips in IE
|
if (Common.Utils.isIE) { // for tooltips in IE
|
||||||
me.btnFullScreen.updateHint( fselem ? '' : me.txtFullScreen);
|
me.btnFullScreen.updateHint( fselem ? '' : me.txtFullScreen);
|
||||||
me.btnPrev.updateHint( fselem ? '' : me.txtPrev);
|
me.btnPrev.updateHint( fselem ? '' : me.txtPrev);
|
||||||
me.btnPlay.updateHint( fselem ? '' : ($('.btn-icon', me.btnPlay.cmpEl).hasClass('btn-pause') ? me.txtPause : me.txtPlay));
|
me.btnPlay.updateHint( fselem ? '' : ($('.icon', me.btnPlay.cmpEl).hasClass('btn-pause') ? me.txtPause : me.txtPlay));
|
||||||
me.btnNext.updateHint( fselem ? '' : me.txtNext);
|
me.btnNext.updateHint( fselem ? '' : me.txtNext);
|
||||||
me.btnClose.updateHint( fselem ? '' : me.txtClose);
|
me.btnClose.updateHint( fselem ? '' : me.txtClose);
|
||||||
} else
|
} else
|
||||||
|
@ -258,7 +258,7 @@ define([
|
||||||
|
|
||||||
Common.UI.BaseView.prototype.show.call(this,arguments);
|
Common.UI.BaseView.prototype.show.call(this,arguments);
|
||||||
|
|
||||||
var iconEl = $('.btn-icon', this.btnPlay.cmpEl);
|
var iconEl = $('.icon', this.btnPlay.cmpEl);
|
||||||
if (!iconEl.hasClass('btn-pause')) {
|
if (!iconEl.hasClass('btn-pause')) {
|
||||||
iconEl.addClass('btn-pause');
|
iconEl.addClass('btn-pause');
|
||||||
this.btnPlay.updateHint(this.txtPause);
|
this.btnPlay.updateHint(this.txtPause);
|
||||||
|
|
|
@ -1642,7 +1642,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');
|
||||||
if (this.showSynchTip) {
|
if (this.showSynchTip) {
|
||||||
|
@ -1677,7 +1677,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');
|
||||||
|
@ -1703,7 +1703,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);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#btn-preview-play {
|
#btn-preview-play {
|
||||||
.btn-tpl(-1280px);
|
.btn-tpl(-1280px);
|
||||||
|
|
||||||
.btn-icon.btn-pause {
|
.icon.btn-pause {
|
||||||
background-position: 0 -1320px;
|
background-position: 0 -1320px;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
|
@ -40,12 +40,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[disabled] .btn-icon.btn-pause {
|
&[disabled] .icon.btn-pause {
|
||||||
background-position: -60px -1320px;
|
background-position: -60px -1320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
.btn-icon.btn-pause {
|
.icon.btn-pause {
|
||||||
background-position: -20px -1320px;
|
background-position: -20px -1320px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue