[PE] Don't add visible signature for presentation editor.

This commit is contained in:
Julia Radzhabova 2017-11-19 10:38:37 +03:00
parent 4f9f366631
commit 0a50b3ac3d

View file

@ -83,9 +83,10 @@ define([
}); });
if (me.appConfig.canProtect) { if (me.appConfig.canProtect) {
this.btnSignature.menu.on('item:click', function (menu, item, e) { if (this.btnSignature.menu)
me.fireEvent('protect:signature', [item.value, false]); this.btnSignature.menu.on('item:click', function (menu, item, e) {
}); me.fireEvent('protect:signature', [item.value, false]);
});
this.btnsInvisibleSignature.forEach(function(button) { this.btnsInvisibleSignature.forEach(function(button) {
button.on('click', function (b, e) { button.on('click', function (b, e) {
@ -112,6 +113,9 @@ define([
this._state = {disabled: false, hasPassword: false}; this._state = {disabled: false, hasPassword: false};
var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
if ( this.appConfig.isDesktopApp && this.appConfig.isOffline ) { if ( this.appConfig.isDesktopApp && this.appConfig.isOffline ) {
this.btnAddPwd = new Common.UI.Button({ this.btnAddPwd = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
@ -128,18 +132,18 @@ define([
visible: false visible: false
}); });
if (this.appConfig.canProtect) if (this.appConfig.canProtect) {
this.btnSignature = new Common.UI.Button({ this.btnSignature = new Common.UI.Button({
cls: 'btn-toolbar x-huge icon-top', cls: 'btn-toolbar x-huge icon-top',
iconCls: 'btn-ic-reviewview', iconCls: 'btn-ic-reviewview',
caption: this.txtSignature, caption: this.txtSignature,
menu: true menu: (this.appPrefix !== 'pe-')
}); });
if (!this.btnSignature.menu)
this.btnsInvisibleSignature.push(this.btnSignature);
}
} }
var filter = Common.localStorage.getKeysFilter();
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this));
}, },
@ -175,8 +179,8 @@ define([
); );
if (me.btnSignature) { if (me.btnSignature) {
me.btnSignature.updateHint(me.hintSignature); me.btnSignature.updateHint((me.btnSignature.menu) ? me.hintSignature : me.txtInvisibleSignature);
me.btnSignature.setMenu( me.btnSignature.menu && me.btnSignature.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
items: [ items: [
{ {