openwebrx-clone/htdocs/lib/settings/WaterfallDropdown.js
Jakob Ketterl 691d88f841 waterfall config fine-adjustments
* hide the waterfall colors input when pre-defined color scheme is
  selected
* skip unparseable lines on custom color input
* fallback to black and white if custom color config is unusable
* always use the waterfall classes when sending changes to the client
2021-02-16 18:35:18 +01:00

11 lines
359 B
JavaScript

$.fn.waterfallDropdown = function(){
this.each(function(){
var $select = $(this);
var setVisibility = function() {
var show = $select.val() === 'CUSTOM';
$('#waterfall_colors').parents('.form-group')[show ? 'show' : 'hide']();
}
$select.on('change', setVisibility);
setVisibility();
})
}