Working jumps (routes) + goToNow now reloads
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
class DatesPopup extends HTMLElement{
|
||||
|
||||
static END = 0;
|
||||
static TIME = 0;
|
||||
static ALL = 1;
|
||||
static DAY = new Date(24*60*60*1000);
|
||||
|
||||
@ -24,10 +24,10 @@ class DatesPopup extends HTMLElement{
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1], DatesPopup.ALL);
|
||||
}
|
||||
|
||||
doJumpEndCallback(){
|
||||
doJumpTimeCallback(){
|
||||
let dateTimeInput = this.getDateTimeInput();
|
||||
this.hide();
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1], DatesPopup.END);
|
||||
this.jumpCallback(dateTimeInput[0], dateTimeInput[1], DatesPopup.TIME);
|
||||
}
|
||||
|
||||
convertTimeStringToTimestamp(formattedTime){
|
||||
@ -62,7 +62,7 @@ class DatesPopup extends HTMLElement{
|
||||
this.hide();
|
||||
this.getElementsByTagName("img")[0].onclick = () => {this.hide();};
|
||||
this.getElementsByClassName("go-to-now-button")[0].onclick = () => {this.doGoToNowCallback();};
|
||||
this.getElementsByClassName("jump-button-end")[0].onclick = () => {this.doJumpEndCallback();};
|
||||
this.getElementsByClassName("jump-button-time")[0].onclick = () => {this.doJumpTimeCallback();};
|
||||
this.getElementsByClassName("jump-button-all")[0].onclick = () => {this.doJumpAllCallback();};
|
||||
}
|
||||
|
||||
@ -85,17 +85,15 @@ class DatesPopup extends HTMLElement{
|
||||
<div class="jump-container">
|
||||
<div class="datetime-container">
|
||||
<input type="date" class="input-date">
|
||||
<input type="time" class="input-time" value="00:00">
|
||||
<input type="time" class="input-time" value="23:59">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="jump-button-end">Curves at the end of the day</button>
|
||||
<!-- <span>Curves at the end of the day</span> -->
|
||||
<button class="jump-button-time">Curves at the given time</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="jump-button-all">All curves</button>
|
||||
<!-- <span>All curves</span> -->
|
||||
<button class="jump-button-all">All curves of the given day</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user