mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-23 18:54:54 +08:00
[PDF] fix dialog for signing
This commit is contained in:
@ -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() {
|
||||
|
||||
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user