Show comment on start

This commit is contained in:
Julia Radzhabova 2019-04-25 15:22:39 +03:00
parent 23f9c4b21b
commit fe434165bf
3 changed files with 23 additions and 6 deletions

View file

@ -194,6 +194,7 @@ 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;
@ -1010,10 +1011,6 @@ define([
me.api.UpdateInterfaceState();
me.fillTextArt(me.api.asc_getTextArtPreviews());
if (me.editorConfig.actionLink && me.editorConfig.actionLink.action && me.editorConfig.actionLink.action.type == 'comment') {
me.contComments.getView().fireEvent('comment:show', [me.editorConfig.actionLink.action.data, false]);
}
Common.NotificationCenter.trigger('document:ready', 'main');
me.applyLicense();
}
@ -1039,6 +1036,12 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
this.contComments.getView().fireEvent('comment:show', [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,6 +180,7 @@ 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;
@ -789,6 +790,12 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
this.getApplication().getController('Common.Controllers.Comments').getView().fireEvent('comment:show', [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

@ -169,6 +169,7 @@ 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,
@ -508,7 +509,7 @@ define([
if (type === Asc.c_oAscAsyncActionType.BlockInteraction && id == Asc.c_oAscAsyncAction.Open) {
Common.Gateway.internalMessage('documentReady', {});
this.onDocumentReady();
this.onDocumentContentReady();
}
action = this.stackLongActions.get({type: Asc.c_oAscAsyncActionType.Information});
@ -625,7 +626,7 @@ define([
}
},
onDocumentReady: function() {
onDocumentContentReady: function() {
if (this._isDocReady)
return;
@ -815,6 +816,12 @@ define([
Common.Gateway.documentReady();
},
onDocumentReady: function() {
if (this.editorConfig.actionLink && this.editorConfig.actionLink.action && this.editorConfig.actionLink.action.type == 'comment') {
this.getApplication().getController('Common.Controllers.Comments').getView().fireEvent('comment:show', [this.editorConfig.actionLink.action.data, false]);
}
},
onLicenseChanged: function(params) {
if (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge) return;