0003-backoffice-disable-simple-list-choice-for-map-dateti.patch
wcs/qommon/static/js/qommon.admin.js | ||
---|---|---|
258 | 258 |
$('[type=radio][name=display_mode]').on('change', function() { |
259 | 259 |
// show everything |
260 | 260 |
$('select[name="data_source$type"] option').show(); |
261 |
$('input[name="data_mode"][value="simple-list"]').prop('disabled', false); |
|
261 | 262 |
// then restrict |
262 | 263 |
if ($(this).val() == 'map') { |
264 |
$('input[name="data_mode"][value="simple-list"]').prop('disabled', true); |
|
263 | 265 |
$('input[name="data_mode"][value="data-source"]').click() |
264 | 266 |
$('select[name="data_source$type"] option:not([data-type="geojson"])').hide(); |
265 | 267 |
if ($('select[name="data_source$type"] option:selected:visible').length == 0) { |
... | ... | |
267 | 269 |
} |
268 | 270 |
} |
269 | 271 |
if ($(this).val() == 'datetimes') { |
272 |
$('input[name="data_mode"][value="simple-list"]').prop('disabled', true); |
|
270 | 273 |
$('input[name="data_mode"][value="data-source"]').click() |
271 | 274 |
$('select[name="data_source$type"] option:not([data-maybe-datetimes="true"])').hide(); |
272 | 275 |
if ($('select[name="data_source$type"] option:selected:visible').length == 0) { |
273 |
- |