Projet

Général

Profil

0001-backoffice-fix-URL-used-for-autocomplete-criteias-on.patch

Frédéric Péters, 07 mai 2021 14:07

Télécharger (1,64 ko)

Voir les différences:

Subject: [PATCH] backoffice: fix URL used for autocomplete criteias on
 statistics pages (#53848)

 wcs/qommon/static/js/wcs.listing.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
wcs/qommon/static/js/wcs.listing.js
180 180
      $('[data-refresh-options]').each(function(idx, elem) {
181 181
        var $select = $(elem);
182 182
        var current_value = $select.val();
183
        var filter_path = pathname + 'filter-options?filter_field_id=' + $(elem).data('refresh-options') + '&' + listing_settings.qs;
183
        var filter_path = pathname.replace(/stats$/, '') + 'filter-options?filter_field_id=' + $(elem).data('refresh-options') + '&' + listing_settings.qs;
184 184
        $.ajax({
185 185
          url: filter_path,
186 186
          success: function(data) {
......
300 300
      minimumInputLength: 1,
301 301
      ajax: {
302 302
        url: function() {
303
          var pathname = window.location.pathname.replace(/^\/+/, '/');
303
          var pathname = window.location.pathname.replace(/^\/+/, '/').replace(/stats$/, '');
304 304
          var filter_settings = $('form#listing-settings').serialize();
305 305
          return pathname + 'filter-options?filter_field_id=' + filter_field_id + '&' + filter_settings;
306 306
        },
307
-