Move selecting comment on loading document to sdkjs

This commit is contained in:
Julia Radzhabova 2019-07-17 15:07:53 +03:00
parent c4a2318c9c
commit a8db76ea39
4 changed files with 1 additions and 33 deletions

View file

@ -130,7 +130,6 @@ define([
});
Common.NotificationCenter.on('comments:updatefilter', _.bind(this.onUpdateFilter, this));
Common.NotificationCenter.on('comments:showaction', _.bind(this.onShowAction, this));
Common.NotificationCenter.on('app:comment:add', _.bind(this.onAppAddComment, this));
Common.NotificationCenter.on('layout:changed', function(area){
Common.Utils.asyncCall(function(e) {
@ -282,12 +281,7 @@ define([
return false;
},
onShowComment: function (id, selected) {
var comment;
if (typeof id == 'object') {
comment = id;
id = comment.get('uid');
} else
comment = this.findComment(id);
var comment = this.findComment(id);
if (comment) {
if (null !== comment.get('quote')) {
if (this.api) {
@ -1528,11 +1522,6 @@ define([
clearCollections: function() {
this.collection.reset();
this.groupCollection = [];
},
onShowAction: function(id, selected) {
var comment = this.collection.findWhere({guid: id});
comment && this.onShowComment(comment, selected);
}
}, Common.Controllers.Comments || {}));

View file

@ -195,7 +195,6 @@ define([
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
this.isShowOpenDialog = false;
@ -1045,12 +1044,6 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
Common.NotificationCenter.trigger('comments:showaction', this.editorConfig.actionLink.action.data, false);
}
},
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&

View file

@ -180,7 +180,6 @@ define([
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
this.isShowOpenDialog = false;
@ -790,12 +789,6 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
Common.NotificationCenter.trigger('comments:showaction', this.editorConfig.actionLink.action.data, false);
}
},
onLicenseChanged: function(params) {
var licType = params.asc_getLicenseType();
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&

View file

@ -168,7 +168,6 @@ define([
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
this.stackLongActions = new Common.IrregularStack({
strongCompare : this._compareActionStrong,
@ -801,12 +800,6 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
Common.NotificationCenter.trigger('comments:showaction', this.editorConfig.actionLink.action.data, false);
}
},
onLicenseChanged: function(params) {
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;