[DE] Set width, height for signature.

This commit is contained in:
Julia Radzhabova 2017-05-24 15:48:03 +03:00
parent 2f92c81749
commit 78ccd37302
3 changed files with 6 additions and 3 deletions

View file

@ -726,7 +726,7 @@ define([
me.mode.isEdit = false;
};
var onSignatureClick = function(guid) {
var onSignatureClick = function(guid, width, height) {
if (_.isUndefined(me.fontStore)) {
me.fontStore = new Common.Collections.Fonts();
var fonts = DE.getController('Toolbar').getView('Toolbar').cmbFontName.store.toJSON();
@ -743,6 +743,7 @@ define([
api: me.api,
signType: 'visible',
fontStore: me.fontStore,
signSize: {width: width, height: height},
handler: function(dlg, result) {
if (result == 'ok') {
var props = dlg.getSettings();
@ -753,6 +754,7 @@ define([
});
win.show();
win.show();
};
var onTextLanguage = function(langid) {

View file

@ -63,6 +63,7 @@ define([
this.api = this.options.api;
this.signType = this.options.signType || 'invisible';
this.signSize = this.options.signSize || {width: 0, height: 0};
this.certificateId = null;
this.signObject = null;
this.fontStore = this.options.fontStore;
@ -266,7 +267,7 @@ define([
if (this.signType == 'visible') {
this.cmbFonts.fillFonts(this.fontStore);
this.signObject = new AscCommon.CSignatureDrawer('signature-preview-img', this.api);
this.signObject = new AscCommon.CSignatureDrawer('signature-preview-img', this.api, this.signSize.width, this.signSize.height);
var rec = this.fontStore.findWhere({name: this.font.name});
this.cmbFonts.setValue((rec) ? rec.get('name') : this.fontStore.at(0).get('name'));

View file

@ -186,7 +186,7 @@ define([
me._state.requestedSignatures.push({name: item.asc_getSigner1(), guid: item.asc_getGuid()});
});
_.each(valid, function(item, index){
var sign = {name: item.asc_getSigner1(), guid: item.asc_getGuid(), date: '18/05/2017'};
var sign = {name: item.asc_getSigner1(), guid: item.asc_getId(), date: '18/05/2017'};
(item.asc_getValid()==0) ? me._state.validSignatures.push(sign) : me._state.invalidSignatures.push(sign);
});
this.cntRequestedSign.html(this.templateRequested({signatures: me._state.requestedSignatures, header: this.strRequested}));