Projet

Général

Profil

0001-forms-trigger-change-instead-of-wcs-change-on-form-e.patch

Thomas Noël, 05 décembre 2018 16:03

Télécharger (3,02 ko)

Voir les différences:

Subject: [PATCH] forms: trigger "change" instead of "wcs:change" on form
 elements (#28575)

 wcs/qommon/static/js/fargo.js             | 2 +-
 wcs/qommon/static/js/qommon.fileupload.js | 4 ++--
 wcs/qommon/static/js/qommon.map.js        | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
wcs/qommon/static/js/fargo.js
47 47
         $(base_widget).find('input[type=hidden]').val(token);
48 48
         $(base_widget).find('input[type=file]').hide();
49 49
         $(base_widget).find('.use-file-from-fargo').hide();
50
         $(base_widget).find('input[type=file]').trigger('wcs:change');
50
         $(base_widget).find('input[type=file]').trigger('change');
51 51
       }
52 52
       document.fargo_close_dialog();
53 53
    }
wcs/qommon/static/js/qommon.fileupload.js
29 29
                $(this).hide();
30 30
                $(base_widget).find('.use-file-from-fargo').hide();
31 31
                $(base_widget).addClass('has-file').removeClass('has-no-file');
32
                $(this).trigger('wcs:change');
32
                $(this).trigger('change');
33 33
            },
34 34
            progress: function (e, data) {
35 35
                var progress = parseInt(data.loaded / data.total * 100, 10);
......
42 42
            $(base_widget).find('input[type=file]').show();
43 43
            $(base_widget).find('.use-file-from-fargo').show();
44 44
            $(base_widget).removeClass('has-file').addClass('has-no-file');
45
            $(base_widget).find('input[type=file]').trigger('wcs:change');
45
            $(base_widget).find('input[type=file]').trigger('change');
46 46
            return false;
47 47
        });
48 48
        $(this).find('a.change').click(function() {
wcs/qommon/static/js/qommon.map.js
68 68
       }
69 69
       map.marker.setLatLng(coords);
70 70
       hidden.val(coords.lat + ';' + coords.lng);
71
       hidden.trigger('wcs:change');
71
       hidden.trigger('change');
72 72
     });
73 73
     $map_widget.on('qommon:invalidate', function() {
74 74
       map.invalidateSize();
......
84 84
         }
85 85
         if (map.marker === null) {
86 86
           hidden.val(e.latlng.lat + ';' + e.latlng.lng);
87
           hidden.trigger('wcs:change');
87
           hidden.trigger('change');
88 88
           map.setView(e.latlng, map_options.zoom);
89 89
           if (position_prefil) {
90 90
             map.setView(e.latlng, 16);
91
-