[PDF] fix dialog for signing

This commit is contained in:
maxkadushkin
2026-02-11 01:30:28 +03:00
parent d04f8f34a1
commit 7ebab8433c
2 changed files with 13 additions and 12 deletions

View File

@ -357,6 +357,13 @@ define([], function () { 'use strict';
me.api.asc_unregisterCallback('asc_CanRedoSignature', onCanRedoChanged);
Common.NotificationCenter.off('storage:image-insert', insertImageFromStorage);
});
const $window = this.getChild();
$window.find('.dlg-btn').on('click', e => {
if ( me.options.handler )
me.options.handler.call(me, event.currentTarget.attributes['result'].value);
me.close();
});
},
updateThemeColors: function() {

View File

@ -1832,24 +1832,18 @@ define([], function () {
return;
}
if (me.mode.canSaveToFile) {
// if (_.isUndefined(me.fontStore)) {
// me.fontStore = new Common.Collections.Fonts();
// var fonts = me.getApplication().getController('Toolbar').getView('Toolbar').cmbFontName.store.toJSON();
// var arr = [];
// _.each(fonts, function(font, index){
// if (!font.cloneid) {
// arr.push(_.clone(font));
// }
// });
// me.fontStore.add(arr);
// }
if (!me.fontStore) {
me.fontStore = new Common.Collections.Fonts();
const fonts = me.getApplication().getController('Toolbar').getView('Toolbar').cmbFontName.store.toJSON();
me.fontStore.add(fonts.filter(font => !font.cloneid));
}
var signProps = obj.asc_getSignatureProps(me.api);
var win = (new Common.Views.PdfSignDialog({
props: signProps,
api: me.api,
disableNetworkFunctionality: me.mode.disableNetworkFunctionality,
storage: me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1,
fontStore: new Common.Collections.Fonts(),
fontStore: me.fontStore,
handler: function(result, value) {
if (result == 'ok') {
me.api.asc_SetSignatureProps(signProps.getResult());