start implementing scheduler input (daylight works)

This commit is contained in:
Jakob Ketterl
2021-02-24 17:12:23 +01:00
parent ea96038201
commit 65758a0098
5 changed files with 154 additions and 3 deletions

View File

@ -0,0 +1,17 @@
$.fn.schedulerInput = function() {
this.each(function() {
var $container = $(this);
var update = function(value){
$container.find('.option').hide();
$container.find('.option.' + value).show();
}
var $select = $container.find('select.mode');
$select.on('change', function(e) {
var value = $(e.target).val();
update(value);
});
update($select.val());
});
}

View File

@ -6,4 +6,5 @@ $(function(){
$('#waterfall_scheme').waterfallDropdown();
$('#rf_gain').gainInput();
$('.optional-section').optionalSection();
$('#scheduler').schedulerInput();
});