From b84d0c64ca223804a41a40eea09f1ec3ca45aa33 Mon Sep 17 00:00:00 2001 From: Thomas NOEL Date: Wed, 5 Dec 2018 14:40:03 +0100 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(-) diff --git a/wcs/qommon/static/js/fargo.js b/wcs/qommon/static/js/fargo.js index 45a8b1a2..1f0807fc 100644 --- a/wcs/qommon/static/js/fargo.js +++ b/wcs/qommon/static/js/fargo.js @@ -47,7 +47,7 @@ $(function() { $(base_widget).find('input[type=hidden]').val(token); $(base_widget).find('input[type=file]').hide(); $(base_widget).find('.use-file-from-fargo').hide(); - $(base_widget).find('input[type=file]').trigger('wcs:change'); + $(base_widget).find('input[type=file]').trigger('change'); } document.fargo_close_dialog(); } diff --git a/wcs/qommon/static/js/qommon.fileupload.js b/wcs/qommon/static/js/qommon.fileupload.js index d0f6a286..9ad83fc6 100644 --- a/wcs/qommon/static/js/qommon.fileupload.js +++ b/wcs/qommon/static/js/qommon.fileupload.js @@ -29,7 +29,7 @@ $(function() { $(this).hide(); $(base_widget).find('.use-file-from-fargo').hide(); $(base_widget).addClass('has-file').removeClass('has-no-file'); - $(this).trigger('wcs:change'); + $(this).trigger('change'); }, progress: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); @@ -42,7 +42,7 @@ $(function() { $(base_widget).find('input[type=file]').show(); $(base_widget).find('.use-file-from-fargo').show(); $(base_widget).removeClass('has-file').addClass('has-no-file'); - $(base_widget).find('input[type=file]').trigger('wcs:change'); + $(base_widget).find('input[type=file]').trigger('change'); return false; }); $(this).find('a.change').click(function() { diff --git a/wcs/qommon/static/js/qommon.map.js b/wcs/qommon/static/js/qommon.map.js index c551f37c..0f64c6d8 100644 --- a/wcs/qommon/static/js/qommon.map.js +++ b/wcs/qommon/static/js/qommon.map.js @@ -68,7 +68,7 @@ $(window).on('load', function() { } map.marker.setLatLng(coords); hidden.val(coords.lat + ';' + coords.lng); - hidden.trigger('wcs:change'); + hidden.trigger('change'); }); $map_widget.on('qommon:invalidate', function() { map.invalidateSize(); @@ -84,7 +84,7 @@ $(window).on('load', function() { } if (map.marker === null) { hidden.val(e.latlng.lat + ';' + e.latlng.lng); - hidden.trigger('wcs:change'); + hidden.trigger('change'); map.setView(e.latlng, map_options.zoom); if (position_prefil) { map.setView(e.latlng, 16); -- 2.19.2