Move selecting comment on loading document to sdkjs
This commit is contained in:
parent
c4a2318c9c
commit
a8db76ea39
|
@ -130,7 +130,6 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
Common.NotificationCenter.on('comments:updatefilter', _.bind(this.onUpdateFilter, this));
|
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('app:comment:add', _.bind(this.onAppAddComment, this));
|
||||||
Common.NotificationCenter.on('layout:changed', function(area){
|
Common.NotificationCenter.on('layout:changed', function(area){
|
||||||
Common.Utils.asyncCall(function(e) {
|
Common.Utils.asyncCall(function(e) {
|
||||||
|
@ -282,12 +281,7 @@ define([
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
onShowComment: function (id, selected) {
|
onShowComment: function (id, selected) {
|
||||||
var comment;
|
var comment = this.findComment(id);
|
||||||
if (typeof id == 'object') {
|
|
||||||
comment = id;
|
|
||||||
id = comment.get('uid');
|
|
||||||
} else
|
|
||||||
comment = this.findComment(id);
|
|
||||||
if (comment) {
|
if (comment) {
|
||||||
if (null !== comment.get('quote')) {
|
if (null !== comment.get('quote')) {
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
|
@ -1528,11 +1522,6 @@ define([
|
||||||
clearCollections: function() {
|
clearCollections: function() {
|
||||||
this.collection.reset();
|
this.collection.reset();
|
||||||
this.groupCollection = [];
|
this.groupCollection = [];
|
||||||
},
|
|
||||||
|
|
||||||
onShowAction: function(id, selected) {
|
|
||||||
var comment = this.collection.findWhere({guid: id});
|
|
||||||
comment && this.onShowComment(comment, selected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, Common.Controllers.Comments || {}));
|
}, Common.Controllers.Comments || {}));
|
||||||
|
|
|
@ -195,7 +195,6 @@ define([
|
||||||
|
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
|
||||||
|
|
||||||
this.isShowOpenDialog = false;
|
this.isShowOpenDialog = false;
|
||||||
|
|
||||||
|
@ -1045,12 +1044,6 @@ define([
|
||||||
Common.Gateway.documentReady();
|
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) {
|
onLicenseChanged: function(params) {
|
||||||
var licType = params.asc_getLicenseType();
|
var licType = params.asc_getLicenseType();
|
||||||
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
||||||
|
|
|
@ -180,7 +180,6 @@ define([
|
||||||
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
|
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
|
||||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
|
||||||
|
|
||||||
this.isShowOpenDialog = false;
|
this.isShowOpenDialog = false;
|
||||||
|
|
||||||
|
@ -790,12 +789,6 @@ define([
|
||||||
Common.Gateway.documentReady();
|
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) {
|
onLicenseChanged: function(params) {
|
||||||
var licType = params.asc_getLicenseType();
|
var licType = params.asc_getLicenseType();
|
||||||
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
if (licType !== undefined && this.appOptions.canEdit && this.editorConfig.mode !== 'view' &&
|
||||||
|
|
|
@ -168,7 +168,6 @@ define([
|
||||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||||
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
|
Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this));
|
||||||
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
|
Common.NotificationCenter.on('download:cancel', _.bind(this.onDownloadCancel, this));
|
||||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
|
||||||
|
|
||||||
this.stackLongActions = new Common.IrregularStack({
|
this.stackLongActions = new Common.IrregularStack({
|
||||||
strongCompare : this._compareActionStrong,
|
strongCompare : this._compareActionStrong,
|
||||||
|
@ -801,12 +800,6 @@ define([
|
||||||
Common.Gateway.documentReady();
|
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) {
|
onLicenseChanged: function(params) {
|
||||||
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;
|
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue