qmsched: set minutes in 5-min steps

pull/1283/head
Richard de Boer 2022-01-12 19:09:00 +01:00
parent 73062edf83
commit 0b455f921c
No known key found for this signature in database
GPG Key ID: 8721727971871937
2 changed files with 7 additions and 18 deletions

View File

@ -5,3 +5,4 @@
0.05: Avoid immediately redrawing widgets on load 0.05: Avoid immediately redrawing widgets on load
0.06: Fix: don't try to redraw widget when widgets not loaded 0.06: Fix: don't try to redraw widget when widgets not loaded
0.07: Option to switch theme 0.07: Option to switch theme
Changed time selection to 5-minute intervals

View File

@ -155,31 +155,19 @@ function showEditMenu(index) {
"< Cancel": () => showMainMenu(), "< Cancel": () => showMainMenu(),
"Hours": { "Hours": {
value: hrs, value: hrs,
onchange: function(v) { min:0, max:23, wrap:true,
if (v<0) {v = 23;} onchange: v => {hrs = v;},
if (v>23) {v = 0;}
hrs = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
}, },
"Minutes": { "Minutes": {
value: mins, value: mins,
onchange: function(v) { min:0, max:55, step:5, wrap:true,
if (v<0) {v = 59;} onchange: v => {mins = v;},
if (v>59) {v = 0;}
mins = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
}, },
"Switch to": { "Switch to": {
value: mode, value: mode,
min:0, max:2, wrap:true,
format: v => modeNames[v], format: v => modeNames[v],
onchange: function(v) { onchange: v => {mode = v;},
if (v<0) {v = 2;}
if (v>2) {v = 0;}
mode = v;
this.value = v;
}, // no arrow fn -> preserve 'this'
}, },
}; };
function getSched() { function getSched() {