691d88f841
* 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
11 lines
359 B
JavaScript
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();
|
|
})
|
|
} |