Merge pull request #838 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-04-25 00:16:48 +03:00 committed by GitHub
commit 6c7a22d39a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 24 deletions

View file

@ -167,8 +167,9 @@ define([
return this;
},
setMode: function(mode) {
setMode: function(mode, api) {
this.appOptions = mode;
this.api = api;
this.customPluginsComplete = !this.appOptions.canBrandingExt;
if (this.appOptions.canBrandingExt)
this.getAppCustomPlugins(this.configPlugins);
@ -514,7 +515,7 @@ define([
var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'),
isEdit = me.appOptions.isEdit,
editor = me.editor,
apiVersion = me.api.GetVersion();
apiVersion = me.api ? me.api.GetVersion() : undefined;
if ( pluginsdata instanceof Array ) {
var arr = [], arrUI = [],
lang = me.appOptions.lang.split(/[\-_]/)[0];

View file

@ -132,7 +132,7 @@ define([
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
}
if (this.appConfig.canReview && !this.appConfig.isReviewOnly)
if (this.appConfig.canReview)
this.api.asc_registerCallback('asc_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));
this.api.asc_registerCallback('asc_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
@ -562,6 +562,7 @@ define([
this.view.turnChanges(true);
} else
if ( this.appConfig.canReview ) {
state = (state=='off') ? false : state; // support of prev. version (on/off)
if (!!global) {
this.api.asc_SetLocalTrackRevisions(null);
this.api.asc_SetGlobalTrackRevisions(!!state);

View file

@ -272,16 +272,8 @@ define([
me.fireEvent('comment:resolve', [commentId]);
readdresolves();
} else if (btn.hasClass('btn-resolve-check', false)) {
var tip = btn.data('bs.tooltip');
if (tip) tip.dontShow = true;
me.fireEvent('comment:resolve', [commentId]);
readdresolves();
} else if (!btn.hasClass('msg-reply') &&
!btn.hasClass('btn-resolve-check') &&
!btn.hasClass('btn-resolve')) {
var isTextSelected = false;
if (btn.hasClass('user-message')) {
@ -377,12 +369,12 @@ define([
}
var arr = [],
btns = $(view.el).find('.btn-resolve');
btns = $(view.el).find('.btn-resolve:not(.comment-resolved)');
btns.tooltip({title: me.textResolve, placement: 'cursor'});
btns.each(function(idx, item){
arr.push($(item).data('bs.tooltip').tip());
});
btns = $(view.el).find('.btn-resolve-check');
btns = $(view.el).find('.comment-resolved');
btns.tooltip({title: me.textOpenAgain, placement: 'cursor'});
btns.each(function(idx, item){
arr.push($(item).data('bs.tooltip').tip());

View file

@ -258,12 +258,12 @@ define([
}
var arr = [],
btns = $(view.el).find('.btn-resolve');
btns = $(view.el).find('.btn-resolve:not(.comment-resolved)');
btns.tooltip({title: me.textResolve, placement: 'cursor'});
btns.each(function (idx, item) {
arr.push($(item).data('bs.tooltip').tip());
});
btns = $(view.el).find('.btn-resolve-check');
btns = $(view.el).find('.comment-resolved');
btns.tooltip({title: me.textOpenAgain, placement: 'cursor'});
btns.each(function (idx, item) {
arr.push($(item).data('bs.tooltip').tip());
@ -451,14 +451,7 @@ define([
readdresolves();
} else if (btn.hasClass('btn-resolve', false)) {
var tip = btn.data('bs.tooltip');
if (tip) tip.dontShow = true;
me.fireEvent('comment:resolve', [commentId]);
readdresolves();
} else if (btn.hasClass('btn-resolve-check', false)) {
} else if (btn.hasClass('btn-resolve')) {
var tip = btn.data('bs.tooltip');
if (tip) tip.dontShow = true;

View file

@ -1340,7 +1340,7 @@ define([
this.appOptions.canRename && appHeader.setCanRename(true);
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions);
this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions, this.api);
if (this.appOptions.canComments)
Common.NotificationCenter.on('comments:cleardummy', _.bind(this.onClearDummyComment, this));