曜日ごとのスケジュール編集での間隔を120分に
-
曜日ごとのスケジュール編集での間隔の上限を120分まで変更お願いできますでしょうか?
patch作りましたので、問題なければ適用おねがいします。diff -ru trunk/index.php trunk.NEW/index.php --- trunk/index.php 2020-01-03 23:02:28.000000000 +0900 +++ trunk.NEW/index.php 2020-01-03 22:59:54.000000000 +0900 @@ -2317,7 +2317,7 @@ <select id="interval_min" data-interval="5"> <?php - for ($i = 5; $i <= 60; $i += 5) { echo '<option value="'.$i.'">' . sprintf(__('%s minutes', $this->plugin_name), $i) . '</option>'; } + for ($i = 5; $i <= 120; $i += 5) { echo '<option value="'.$i.'">' . sprintf(__('%s minutes', $this->plugin_name), $i) . '</option>'; } ?> </select> diff -ru trunk/js/Schedule.js trunk.NEW/js/Schedule.js --- trunk/js/Schedule.js 2020-01-03 23:02:28.000000000 +0900 +++ trunk.NEW/js/Schedule.js 2020-01-03 23:03:26.000000000 +0900 @@ -1627,26 +1627,8 @@ object._console.log("from = " + from + " to = " + to + " interval = " + interval + " load_deadline_time = " + load_deadline_time + " load_capacity = " + load_capacity); var readList = []; var base_min = 0; - for (var i = parseInt(from); i <= parseInt(to); i++) { - - for (var min = base_min; min < 60; min += parseInt(interval)) { - - if (min < 0) { - - continue; - - } - - readList.push({hour: i, min: min, deadline: load_deadline_time, capacities: load_capacity, remainders: load_capacity}); - if (min + parseInt(interval) >= 60) { - - base_min = min - 60; - break; - - } - - } - + for (var time = parseInt(from) * 60; time <= parseInt(to) * 60; time += parseInt(interval)) { + readList.push({hour: Math.floor(time / 60), min: time % 60, deadline: load_deadline_time, capacities: load_capacity, remainders: load_capacity}); } object._console.log(readList);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘曜日ごとのスケジュール編集での間隔を120分に’ is closed to new replies.