Merge pull request #1625 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2022-03-14 13:31:55 +03:00 committed by GitHub
commit ca553d8017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 11 deletions

View file

@ -966,6 +966,7 @@ define([
}
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this._state.timerDisconnect && clearTimeout(this._state.timerDisconnect);
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
@ -1073,7 +1074,9 @@ define([
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
me._state.timerDisconnect = setTimeout(function(){
me.getApplication().getController('Statusbar').showDisconnectTip();
}, me._state.unloadTimer || 0);
};
break;
@ -2082,12 +2085,15 @@ define([
if (this.api.isDocumentModified()) {
var me = this;
this.api.asc_stopSaving();
this._state.unloadTimer = 1000;
this.continueSavingTimer = window.setTimeout(function() {
me.api.asc_continueSaving();
me._state.unloadTimer = 0;
}, 500);
return this.leavePageText;
}
} else
this._state.unloadTimer = 10000;
},
onUnload: function() {

View file

@ -135,11 +135,11 @@
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-img-align"></span>
<span class="btn-slot text x-huge" id="slot-img-group"></span>
<span class="btn-slot text x-huge" id="slot-img-wrapping"></span>
<span class="btn-slot text x-huge" id="slot-img-movefrwd"></span>
<span class="btn-slot text x-huge" id="slot-img-movebkwd"></span>
<span class="btn-slot text x-huge" id="slot-img-wrapping"></span>
<span class="btn-slot text x-huge" id="slot-img-align"></span>
<span class="btn-slot text x-huge" id="slot-img-group"></span>
</div>
<div class="separator long"></div>
<div class="group">

View file

@ -629,6 +629,7 @@ define([
this.synchronizeChanges();
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this._state.timerDisconnect && clearTimeout(this._state.timerDisconnect);
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
@ -726,7 +727,9 @@ define([
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
me._state.timerDisconnect = setTimeout(function(){
me.getApplication().getController('Statusbar').showDisconnectTip();
}, me._state.unloadTimer || 0);
};
break;
@ -1700,12 +1703,15 @@ define([
if (this.api.isDocumentModified()) {
var me = this;
this.api.asc_stopSaving();
this._state.unloadTimer = 1000;
this.continueSavingTimer = window.setTimeout(function() {
me.api.asc_continueSaving();
me._state.unloadTimer = 0;
}, 500);
return this.leavePageText;
}
} else
this._state.unloadTimer = 10000;
},
onUnload: function() {

View file

@ -714,6 +714,7 @@ define([
this.onEditComplete(this.loadMask, {restorefocus:true});
}
if ( id == Asc.c_oAscAsyncAction['Disconnect']) {
this._state.timerDisconnect && clearTimeout(this._state.timerDisconnect);
this.disableEditing(false, true);
this.getApplication().getController('Statusbar').hideDisconnectTip();
this.getApplication().getController('Statusbar').setStatusCaption(this.textReconnect);
@ -800,7 +801,9 @@ define([
this.disableEditing(true, true);
var me = this;
statusCallback = function() {
me.getApplication().getController('Statusbar').showDisconnectTip();
me._state.timerDisconnect = setTimeout(function(){
me.getApplication().getController('Statusbar').showDisconnectTip();
}, me._state.unloadTimer || 0);
};
break;
@ -2069,12 +2072,15 @@ define([
if (isEdit && this.api.asc_isDocumentModified()) {
var me = this;
this.api.asc_stopSaving();
this._state.unloadTimer = 1000;
this.continueSavingTimer = window.setTimeout(function() {
me.api.asc_continueSaving();
me._state.unloadTimer = 0;
}, 500);
return this.leavePageText;
}
} else
this._state.unloadTimer = 10000;
},
onUnload: function() {

View file

@ -172,10 +172,10 @@
</div>
<div class="separator long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-img-align"></span>
<span class="btn-slot text x-huge" id="slot-img-group"></span>
<span class="btn-slot text x-huge" id="slot-img-movefrwd"></span>
<span class="btn-slot text x-huge" id="slot-img-movebkwd"></span>
<span class="btn-slot text x-huge" id="slot-img-align"></span>
<span class="btn-slot text x-huge" id="slot-img-group"></span>
</div>
<div class="separator long"></div>
<div class="group">