Projet

Général

Profil

0001-backoffice-never-allow-invalid-geojson-data-source-s.patch

Frédéric Péters, 20 juillet 2021 18:31

Télécharger (1,26 ko)

Voir les différences:

Subject: [PATCH] backoffice: never allow invalid geojson data source selection
 (#55720)

 wcs/qommon/static/js/qommon.admin.js | 5 +++++
 1 file changed, 5 insertions(+)
wcs/qommon/static/js/qommon.admin.js
282 282
        if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
283 283
          $('select[name="data_source$type"] option:visible').first().prop('selected', true).trigger('change');
284 284
        }
285
        if ($('select[name="data_source$type"] option:selected:visible').length == 0) {
286
          // stil empty, it means there are no geojson sources at all, display
287
          // first option (which will be "None").
288
          $('select[name="data_source$type"] option').first().show().prop('selected', true);
289
        }
285 290
      }
286 291
      if ($(this).val() == 'timetable') {
287 292
        $('input[name="data_mode"][value="simple-list"]').prop('disabled', true);
288
-