mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 13:50:46 +08:00
[DE Form] Add mark as final button
This commit is contained in:
committed by
Maxim Kadushkin
parent
e6530ff812
commit
193ec79311
@ -61,7 +61,8 @@ define([
|
||||
this.addListeners({
|
||||
'Common.Views.Protection': {
|
||||
'protect:password': _.bind(this.onPasswordClick, this),
|
||||
'protect:signature': _.bind(this.onSignatureClick, this)
|
||||
'protect:signature': _.bind(this.onSignatureClick, this),
|
||||
'protect:markAsFinal': _.bind(this.onMarkAsFinal, this),
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -132,6 +133,10 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
onMarkAsFinal: function(state) {
|
||||
this.api && this.api.markAsFinal(state);
|
||||
},
|
||||
|
||||
createToolbarPanel: function() {
|
||||
return this.view.getPanel();
|
||||
},
|
||||
@ -147,6 +152,7 @@ define([
|
||||
accept();
|
||||
})).then(function(){
|
||||
me.onChangeProtectDocument();
|
||||
me.view && me.view.btnMarkAsFinal && me.view.btnMarkAsFinal.toggle(me.api.isFinal(), true);
|
||||
Common.NotificationCenter.on('protect:doclock', _.bind(me.onChangeProtectDocument, me));
|
||||
});
|
||||
},
|
||||
|
||||
@ -57,6 +57,7 @@ define([
|
||||
'<span id="slot-btn-add-password" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="slot-btn-change-password" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="slot-btn-signature" class="btn-slot text x-huge"></span>' +
|
||||
'<span id="slot-btn-mark-as-final" class="btn-slot text x-huge"></span>' +
|
||||
'</div>' +
|
||||
'</section>';
|
||||
|
||||
@ -122,6 +123,7 @@ define([
|
||||
|
||||
this._state = {disabled: false, hasPassword: false, disabledPassword: false, invisibleSignDisabled: false};
|
||||
|
||||
const me = this;
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
|
||||
@ -163,6 +165,20 @@ define([
|
||||
this.btnsInvisibleSignature.push(this.btnSignature);
|
||||
}
|
||||
|
||||
if(this.appConfig.isPDFForm) {
|
||||
this.btnMarkAsFinal = new Common.UI.Button({
|
||||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-ic-protect',
|
||||
caption: this.txtMarkAsFinal,
|
||||
enableToggle: true,
|
||||
dataHint : '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.btnMarkAsFinal.on('toggle', function (btn, state) {
|
||||
me.fireEvent('protect:markAsFinal', [state]);
|
||||
});
|
||||
}
|
||||
|
||||
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
|
||||
},
|
||||
@ -231,6 +247,7 @@ define([
|
||||
this.btnAddPwd && this.btnAddPwd.render(this.$el.find('#slot-btn-add-password'));
|
||||
this.btnPwd && this.btnPwd.render(this.$el.find('#slot-btn-change-password'));
|
||||
this.btnSignature && this.btnSignature.render(this.$el.find('#slot-btn-signature'));
|
||||
this.btnMarkAsFinal && this.btnMarkAsFinal.render(this.$el.find('#slot-btn-mark-as-final'));
|
||||
}
|
||||
return this.$el;
|
||||
},
|
||||
@ -353,6 +370,7 @@ define([
|
||||
},
|
||||
|
||||
txtEncrypt: 'Encrypt',
|
||||
txtMarkAsFinal: 'Mark as final',
|
||||
txtSignature: 'Signature',
|
||||
hintAddPwd: 'Encrypt with password',
|
||||
hintPwd: 'Change or delete password',
|
||||
|
||||
@ -1051,6 +1051,7 @@
|
||||
"Common.Views.Protection.txtChangePwd": "Change password",
|
||||
"Common.Views.Protection.txtDeletePwd": "Delete password",
|
||||
"Common.Views.Protection.txtEncrypt": "Encrypt",
|
||||
"Common.Views.Protection.txtMarkAsFinal": "Mark as final",
|
||||
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
|
||||
"Common.Views.Protection.txtSignature": "Signature",
|
||||
"Common.Views.Protection.txtSignatureLine": "Add signature line",
|
||||
|
||||
@ -823,6 +823,7 @@
|
||||
"Common.Views.Protection.txtChangePwd": "Change password",
|
||||
"Common.Views.Protection.txtDeletePwd": "Delete password",
|
||||
"Common.Views.Protection.txtEncrypt": "Encrypt",
|
||||
"Common.Views.Protection.txtMarkAsFinal": "Mark as final",
|
||||
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
|
||||
"Common.Views.Protection.txtSignature": "Signature",
|
||||
"Common.Views.Protection.txtSignatureLine": "Add signature line",
|
||||
|
||||
@ -1134,6 +1134,7 @@
|
||||
"Common.Views.Protection.txtChangePwd": "Change password",
|
||||
"Common.Views.Protection.txtDeletePwd": "Delete password",
|
||||
"Common.Views.Protection.txtEncrypt": "Encrypt",
|
||||
"Common.Views.Protection.txtMarkAsFinal": "Mark as final",
|
||||
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
|
||||
"Common.Views.Protection.txtSignature": "Signature",
|
||||
"Common.Views.Protection.txtSignatureLine": "Add signature line",
|
||||
|
||||
@ -1072,6 +1072,7 @@
|
||||
"Common.Views.Protection.txtChangePwd": "Change password",
|
||||
"Common.Views.Protection.txtDeletePwd": "Delete password",
|
||||
"Common.Views.Protection.txtEncrypt": "Encrypt",
|
||||
"Common.Views.Protection.txtMarkAsFinal": "Mark as final",
|
||||
"Common.Views.Protection.txtInvisibleSignature": "Add digital signature",
|
||||
"Common.Views.Protection.txtSignature": "Signature",
|
||||
"Common.Views.Protection.txtSignatureLine": "Add signature line",
|
||||
|
||||
Reference in New Issue
Block a user