diff --git a/apps/pdfeditor/main/app/controller/RedactTab.js b/apps/pdfeditor/main/app/controller/RedactTab.js index 4f47e37294..e031014e32 100644 --- a/apps/pdfeditor/main/app/controller/RedactTab.js +++ b/apps/pdfeditor/main/app/controller/RedactTab.js @@ -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) });