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
This commit is contained in:
11
htdocs/lib/settings/WaterfallDropdown.js
Normal file
11
htdocs/lib/settings/WaterfallDropdown.js
Normal file
@ -0,0 +1,11 @@
|
||||
$.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();
|
||||
})
|
||||
}
|
@ -4,4 +4,5 @@ $(function(){
|
||||
$('.imageupload').imageUpload();
|
||||
$('.bookmarks').bookmarktable();
|
||||
$('.wsjt-decoding-depths').wsjtDecodingDepthsInput();
|
||||
$('#waterfall_scheme').waterfallDropdown();
|
||||
});
|
Reference in New Issue
Block a user