mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
Refactoring
This commit is contained in:
@ -58,7 +58,7 @@ define([
|
||||
onLaunch: function () {
|
||||
this._state = {};
|
||||
|
||||
this.redactionsWarningVisible = null;
|
||||
this.redactionsWarning = null;
|
||||
this.isFileMenuTab = null;
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
Common.NotificationCenter.on('document:ready', _.bind(this.onDocumentReady, this));
|
||||
@ -194,9 +194,9 @@ define([
|
||||
const isMarked = this.api.HasRedact();
|
||||
if (
|
||||
isMarked &&
|
||||
(!this.redactionsWarningVisible || !this.redactionsWarningVisible.isVisible())
|
||||
(!this.redactionsWarning || !this.redactionsWarning.isVisible())
|
||||
) {
|
||||
this.redactionsWarningVisible = Common.UI.warning({
|
||||
this.redactionsWarning = Common.UI.warning({
|
||||
width: 500,
|
||||
msg: this.textUnappliedRedactions,
|
||||
buttons: [{
|
||||
@ -216,7 +216,7 @@ define([
|
||||
this.api.RemoveAllRedact();
|
||||
this.api.SetRedactTool(false);
|
||||
this.view.btnMarkForRedact.toggle(false);
|
||||
} else if (btn == 'cancel') {
|
||||
} else {
|
||||
if (this.isFileMenuTab) {
|
||||
this.view.fireEvent('menu:hide', [this]);
|
||||
}
|
||||
@ -233,7 +233,7 @@ define([
|
||||
this.api.SetRedactTool(false);
|
||||
}
|
||||
}
|
||||
this.isFileMenuTab = tab === 'file' ? true : false;
|
||||
this.isFileMenuTab = tab === 'file';
|
||||
},
|
||||
|
||||
onRedactionStateToggle: function(isRedaction) {
|
||||
|
||||
Reference in New Issue
Block a user