Fix bug creating

parent 222af203
......@@ -133,22 +133,26 @@ window.addEventListener("load", function() {
document.querySelector("#saveTime").dataset["time"] = timespentValue;
});
let openButtonTop = document.querySelector("#commit_top");
let openButtonTop = document.getElementById("commit_top");
openButtonTop.addEventListener("click", function(event) {
// cancel form submiting
event.preventDefault();
if (openButtonTop) {
let timespentValue = getTimespentValue();
openButtonTop.addEventListener("click", function(event) {
// cancel form submiting
event.preventDefault();
dialog.style.display = "block";
focusManager.capture(dialog);
let timespentValue = getTimespentValue();
// write work time in input value
document.querySelector("#realworktime").value =
localStorage.time === undefined ? timespentValue : localStorage.time;
document.querySelector("#saveTime").dataset["time"] = timespentValue;
});
dialog.style.display = "block";
focusManager.capture(dialog);
// write work time in input value
document.querySelector("#realworktime").value =
localStorage.time === undefined ? timespentValue : localStorage.time;
document.querySelector("#saveTime").dataset["time"] = timespentValue;
});
}
document
.querySelector("#realworktime")
......
......@@ -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/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 @@
<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.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