Fix Bug 49343
This commit is contained in:
parent
a65bb211d7
commit
552362ed55
|
@ -25,6 +25,7 @@ class ContextMenu extends ContextMenuController {
|
|||
this.onApiHideComment = this.onApiHideComment.bind(this);
|
||||
this.onApiShowChange = this.onApiShowChange.bind(this);
|
||||
this.getUserName = this.getUserName.bind(this);
|
||||
this.ShowModal = this.ShowModal.bind(this);
|
||||
}
|
||||
|
||||
static closeContextMenu() {
|
||||
|
@ -43,9 +44,13 @@ class ContextMenu extends ContextMenuController {
|
|||
api.asc_unregisterCallback('asc_onShowComment', this.onApiShowComment);
|
||||
api.asc_unregisterCallback('asc_onHideComment', this.onApiHideComment);
|
||||
api.asc_unregisterCallback('asc_onShowRevisionsChange', this.onApiShowChange);
|
||||
Common.Notifications.off('showSplitModal', this.ShowModal);
|
||||
}
|
||||
|
||||
|
||||
ShowModal() {
|
||||
this.showSplitModal()
|
||||
}
|
||||
|
||||
onApiShowComment(comments) {
|
||||
this.isComments = comments && comments.length > 0;
|
||||
}
|
||||
|
@ -199,6 +204,7 @@ class ContextMenu extends ContextMenuController {
|
|||
api.asc_registerCallback('asc_onShowComment', this.onApiShowComment);
|
||||
api.asc_registerCallback('asc_onHideComment', this.onApiHideComment);
|
||||
api.asc_registerCallback('asc_onShowRevisionsChange', this.onApiShowChange);
|
||||
Common.Notifications.on('showSplitModal', this.ShowModal);
|
||||
}
|
||||
|
||||
initMenuItems() {
|
||||
|
|
|
@ -199,14 +199,18 @@ const ErrorController = inject('storeAppOptions')(({storeAppOptions, LoadingDocu
|
|||
Common.Gateway.reportWarning(id, config.msg);
|
||||
|
||||
config.title = _t.notcriticalErrorTitle;
|
||||
|
||||
config.callback = (btn) => {
|
||||
if (id === Asc.c_oAscError.ID.Warning && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) {
|
||||
api.asc_DownloadOrigin();
|
||||
} else if(id === Asc.c_oAscError.ID.SplitCellMaxRows ||
|
||||
Asc.c_oAscError.ID.SplitCellMaxCols ||
|
||||
Asc.c_oAscError.ID.SplitCellRowsDivider && btn === 'ok' && (storeAppOptions.canDownload || storeAppOptions.canDownloadOrigin)) {
|
||||
Common.Notifications.trigger('showSplitModal',true);
|
||||
}
|
||||
storeAppOptions.changeEditingRights(false);
|
||||
};
|
||||
}
|
||||
|
||||
f7.dialog.create({
|
||||
cssClass: 'error-dialog',
|
||||
title : config.title,
|
||||
|
|
Loading…
Reference in a new issue