Projet

Général

Profil

0001-misc-trigger-live-evaluation-after-file-token-is-kno.patch

Frédéric Péters, 09 novembre 2021 17:18

Télécharger (2,24 ko)

Voir les différences:

Subject: [PATCH] misc: trigger live evaluation after file token is known
 (#58509)

 wcs/qommon/static/js/qommon.fileupload.js | 2 ++
 wcs/qommon/static/js/qommon.forms.js      | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
wcs/qommon/static/js/qommon.fileupload.js
317 317
                $(base_widget).find('.use-file-from-fargo').hide();
318 318
                $(base_widget).addClass('has-file').removeClass('has-no-file');
319 319
                $(this).trigger('change');
320
                $(base_widget).find('input[type=hidden]').trigger('change');
320 321
            },
321 322
            fail: function(e, data) {
322 323
                $(base_widget).find('.fileprogress').addClass('upload-error');
......
335 336
            $(base_widget).find('.use-file-from-fargo').show();
336 337
            $(base_widget).removeClass('has-file').addClass('has-no-file');
337 338
            $(base_widget).find('input[type=file]').trigger('change');
339
            $(base_widget).find('input[type=hidden]').trigger('change');
338 340
            return false;
339 341
        });
340 342
        $(this).find('a.change').click(function() {
wcs/qommon/static/js/qommon.forms.js
499 499
  }
500 500
  if ($('div[data-live-source]').length) {
501 501
    $('form').on('change input paste wcs:change',
502
        'div[data-live-source] input, div[data-live-source] select, div[data-live-source] textarea',
502
        'div[data-live-source] input:not([type=file]), div[data-live-source] select, div[data-live-source] textarea',
503 503
        function(ev) {
504 504
          var modified_field = $(this).parents('[data-field-id]').data('field-id');
505 505
         $(this).parents('form').trigger('wcs:change', {modified_field: modified_field});
506
-