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