Fix version history

This commit is contained in:
Julia Radzhabova 2021-07-28 14:23:40 +03:00
parent 8635e274e5
commit 5454b06329
4 changed files with 26 additions and 24 deletions

View file

@ -104,38 +104,37 @@ define([
return this; return this;
}, },
show: function(){ internalShow: function() {
// if (maskeEl || loaderEl) this.ownerEl.append(this.maskeEl);
// return; this.ownerEl.append(this.loaderEl);
this.loaderEl.css('min-width', $('.asc-loadmask-title', this.loaderEl).width() + 105);
if (this.ownerEl && this.ownerEl.closest('.asc-window.modal').length==0)
Common.util.Shortcuts.suspendEvents();
},
show: function(immediately){
// The owner is already masked // The owner is already masked
var ownerEl = this.ownerEl, if (!!this.ownerEl.ismasked)
loaderEl = this.loaderEl,
maskeEl = this.maskeEl;
if (!!ownerEl.ismasked)
return this; return this;
ownerEl.ismasked = true; this.ownerEl.ismasked = true;
var me = this; var me = this;
if (me.title != me.options.title) { if (me.title != me.options.title) {
me.options.title = me.title; me.options.title = me.title;
$('.asc-loadmask-title', loaderEl).html(me.title); $('.asc-loadmask-title', this.loaderEl).html(me.title);
} }
if (immediately) {
me.internalShow();
} else if (!me.timerId) {
// show mask after 500 ms if it wont be hided // show mask after 500 ms if it wont be hided
me.timerId = setTimeout(function () { me.timerId = setTimeout(function () {
ownerEl.append(maskeEl); me.internalShow();
ownerEl.append(loaderEl);
// if (ownerEl.height()<1 || ownerEl.width()<1)
// loaderEl.css({visibility: 'hidden'});
loaderEl.css('min-width', $('.asc-loadmask-title', loaderEl).width() + 105);
if (ownerEl && ownerEl.closest('.asc-window.modal').length==0)
Common.util.Shortcuts.suspendEvents();
},500); },500);
}
return this; return this;
}, },

View file

@ -177,6 +177,9 @@ define([
}; };
Common.UI.alert(config); Common.UI.alert(config);
} else { } else {
if (this.currentRev !== opts.data.version) {
return;
}
var commentsController = this.getApplication().getController('Common.Controllers.Comments'); var commentsController = this.getApplication().getController('Common.Controllers.Comments');
if (commentsController) { if (commentsController) {
commentsController.onApiHideComment(); commentsController.onApiHideComment();

View file

@ -962,7 +962,7 @@ define([
this.loadMask.setTitle(title); this.loadMask.setTitle(title);
if (!this.isShowOpenDialog) if (!this.isShowOpenDialog)
this.loadMask.show(); this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
} else { } else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force); this.getApplication().getController('Statusbar').setStatusCaption(text, force);
} }

View file

@ -709,7 +709,7 @@ define([
this.loadMask.setTitle(title); this.loadMask.setTitle(title);
if (!this.isShowOpenDialog) if (!this.isShowOpenDialog)
this.loadMask.show(); this.loadMask.show(action.id===Asc.c_oAscAsyncAction['Open']);
} else { } else {
this.getApplication().getController('Statusbar').setStatusCaption(text, force); this.getApplication().getController('Statusbar').setStatusCaption(text, force);
} }