commit
6c7a22d39a
|
@ -167,8 +167,9 @@ define([
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
setMode: function(mode) {
|
setMode: function(mode, api) {
|
||||||
this.appOptions = mode;
|
this.appOptions = mode;
|
||||||
|
this.api = api;
|
||||||
this.customPluginsComplete = !this.appOptions.canBrandingExt;
|
this.customPluginsComplete = !this.appOptions.canBrandingExt;
|
||||||
if (this.appOptions.canBrandingExt)
|
if (this.appOptions.canBrandingExt)
|
||||||
this.getAppCustomPlugins(this.configPlugins);
|
this.getAppCustomPlugins(this.configPlugins);
|
||||||
|
@ -514,7 +515,7 @@ define([
|
||||||
var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'),
|
var pluginStore = this.getApplication().getCollection('Common.Collections.Plugins'),
|
||||||
isEdit = me.appOptions.isEdit,
|
isEdit = me.appOptions.isEdit,
|
||||||
editor = me.editor,
|
editor = me.editor,
|
||||||
apiVersion = me.api.GetVersion();
|
apiVersion = me.api ? me.api.GetVersion() : undefined;
|
||||||
if ( pluginsdata instanceof Array ) {
|
if ( pluginsdata instanceof Array ) {
|
||||||
var arr = [], arrUI = [],
|
var arr = [], arrUI = [],
|
||||||
lang = me.appOptions.lang.split(/[\-_]/)[0];
|
lang = me.appOptions.lang.split(/[\-_]/)[0];
|
||||||
|
|
|
@ -132,7 +132,7 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this));
|
||||||
this.api.asc_registerCallback('asc_onParticipantsChanged', _.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_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));
|
||||||
this.api.asc_registerCallback('asc_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this));
|
this.api.asc_registerCallback('asc_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this));
|
||||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
|
||||||
|
@ -562,6 +562,7 @@ define([
|
||||||
this.view.turnChanges(true);
|
this.view.turnChanges(true);
|
||||||
} else
|
} else
|
||||||
if ( this.appConfig.canReview ) {
|
if ( this.appConfig.canReview ) {
|
||||||
|
state = (state=='off') ? false : state; // support of prev. version (on/off)
|
||||||
if (!!global) {
|
if (!!global) {
|
||||||
this.api.asc_SetLocalTrackRevisions(null);
|
this.api.asc_SetLocalTrackRevisions(null);
|
||||||
this.api.asc_SetGlobalTrackRevisions(!!state);
|
this.api.asc_SetGlobalTrackRevisions(!!state);
|
||||||
|
|
|
@ -272,16 +272,8 @@ define([
|
||||||
|
|
||||||
me.fireEvent('comment:resolve', [commentId]);
|
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();
|
readdresolves();
|
||||||
} else if (!btn.hasClass('msg-reply') &&
|
} else if (!btn.hasClass('msg-reply') &&
|
||||||
!btn.hasClass('btn-resolve-check') &&
|
|
||||||
!btn.hasClass('btn-resolve')) {
|
!btn.hasClass('btn-resolve')) {
|
||||||
var isTextSelected = false;
|
var isTextSelected = false;
|
||||||
if (btn.hasClass('user-message')) {
|
if (btn.hasClass('user-message')) {
|
||||||
|
@ -377,12 +369,12 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var arr = [],
|
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.tooltip({title: me.textResolve, placement: 'cursor'});
|
||||||
btns.each(function(idx, item){
|
btns.each(function(idx, item){
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
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.tooltip({title: me.textOpenAgain, placement: 'cursor'});
|
||||||
btns.each(function(idx, item){
|
btns.each(function(idx, item){
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
|
|
|
@ -258,12 +258,12 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var arr = [],
|
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.tooltip({title: me.textResolve, placement: 'cursor'});
|
||||||
btns.each(function (idx, item) {
|
btns.each(function (idx, item) {
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
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.tooltip({title: me.textOpenAgain, placement: 'cursor'});
|
||||||
btns.each(function (idx, item) {
|
btns.each(function (idx, item) {
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
|
@ -451,14 +451,7 @@ define([
|
||||||
|
|
||||||
readdresolves();
|
readdresolves();
|
||||||
|
|
||||||
} else if (btn.hasClass('btn-resolve', false)) {
|
} else if (btn.hasClass('btn-resolve')) {
|
||||||
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)) {
|
|
||||||
var tip = btn.data('bs.tooltip');
|
var tip = btn.data('bs.tooltip');
|
||||||
if (tip) tip.dontShow = true;
|
if (tip) tip.dontShow = true;
|
||||||
|
|
||||||
|
|
|
@ -1340,7 +1340,7 @@ define([
|
||||||
|
|
||||||
this.appOptions.canRename && appHeader.setCanRename(true);
|
this.appOptions.canRename && appHeader.setCanRename(true);
|
||||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins);
|
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)
|
if (this.appOptions.canComments)
|
||||||
Common.NotificationCenter.on('comments:cleardummy', _.bind(this.onClearDummyComment, this));
|
Common.NotificationCenter.on('comments:cleardummy', _.bind(this.onClearDummyComment, this));
|
||||||
|
|
Loading…
Reference in a new issue