mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
fixed double dialog
This commit is contained in:
@ -58,6 +58,7 @@ define([
|
||||
onLaunch: function () {
|
||||
this._state = {};
|
||||
|
||||
this.redactionsWarningVisible = null;
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
||||
|
||||
@ -190,7 +191,8 @@ define([
|
||||
Common.UI.TooltipManager.closeTip('mark-for-redaction');
|
||||
Common.UI.TooltipManager.closeTip('apply-redaction');
|
||||
const isMarked = this.api.HasRedact();
|
||||
if (isMarked) {
|
||||
if (isMarked && !this.redactionsWarningVisible) {
|
||||
this.redactionsWarningVisible = true;
|
||||
Common.UI.warning({
|
||||
width: 500,
|
||||
msg: this.textUnappliedRedactions,
|
||||
@ -207,16 +209,19 @@ define([
|
||||
this.api.ApplyRedact();
|
||||
this.api.SetRedactTool(false);
|
||||
this.view.btnMarkForRedact.toggle(false);
|
||||
this.redactionsWarningVisible = false;
|
||||
} else if (btn == 'doNotApply') {
|
||||
this.api.RemoveAllRedact();
|
||||
this.api.SetRedactTool(false);
|
||||
this.view.btnMarkForRedact.toggle(false);
|
||||
this.redactionsWarningVisible = false;
|
||||
} else if (btn == 'cancel') {
|
||||
if (this.mode.isPDFEdit) {
|
||||
this.toolbar.toolbar.setTab('red')
|
||||
} else {
|
||||
Common.NotificationCenter.trigger('pdf:mode-apply', 'edit', 'red');
|
||||
}
|
||||
this.redactionsWarningVisible = false;
|
||||
}
|
||||
}, this)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user