Fix bug creating

parent 222af203
...@@ -133,22 +133,26 @@ window.addEventListener("load", function() { ...@@ -133,22 +133,26 @@ window.addEventListener("load", function() {
document.querySelector("#saveTime").dataset["time"] = timespentValue; document.querySelector("#saveTime").dataset["time"] = timespentValue;
}); });
let openButtonTop = document.querySelector("#commit_top"); let openButtonTop = document.getElementById("commit_top");
openButtonTop.addEventListener("click", function(event) { if (openButtonTop) {
// cancel form submiting
event.preventDefault();
let timespentValue = getTimespentValue(); openButtonTop.addEventListener("click", function(event) {
// cancel form submiting
event.preventDefault();
dialog.style.display = "block"; let timespentValue = getTimespentValue();
focusManager.capture(dialog);
// write work time in input value dialog.style.display = "block";
document.querySelector("#realworktime").value = focusManager.capture(dialog);
localStorage.time === undefined ? timespentValue : localStorage.time;
document.querySelector("#saveTime").dataset["time"] = timespentValue; // write work time in input value
}); document.querySelector("#realworktime").value =
localStorage.time === undefined ? timespentValue : localStorage.time;
document.querySelector("#saveTime").dataset["time"] = timespentValue;
});
}
document document
.querySelector("#realworktime") .querySelector("#realworktime")
......
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
<script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script> <script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script> <script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?10_09_2020"></script> <script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020"></script>
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
<script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script> <script language="javascript" type="text/javascript" src="js/etersoft/focusManager.js"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script> <script language="javascript" type="text/javascript" src="js/etersoft/timer_common.js?25_10_2017"></script>
<script language="javascript" type="text/javascript" src="js/etersoft/timer.js?10_09_2020"></script> <script language="javascript" type="text/javascript" src="js/etersoft/timer.js?11_09_2020"></script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment