mirror of
https://github.com/itflow-org/itflow
synced 2026-03-06 22:04:51 +00:00
clear local storage when responding
This commit is contained in:
@@ -39,6 +39,10 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
localStorage.setItem(getLocalStorageKey(), JSON.stringify(timeData));
|
localStorage.setItem(getLocalStorageKey(), JSON.stringify(timeData));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearTimeStorage() {
|
||||||
|
localStorage.removeItem(getLocalStorageKey());
|
||||||
|
}
|
||||||
|
|
||||||
function startTimer() {
|
function startTimer() {
|
||||||
if (timerInterval === null) {
|
if (timerInterval === null) {
|
||||||
timerInterval = setInterval(countTime, 1000);
|
timerInterval = setInterval(countTime, 1000);
|
||||||
@@ -121,5 +125,8 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
document.getElementById("toggleTimer").addEventListener('click', toggleTimer);
|
document.getElementById("toggleTimer").addEventListener('click', toggleTimer);
|
||||||
document.getElementById("time_worked").addEventListener('focus', pauseForEdit);
|
document.getElementById("time_worked").addEventListener('focus', pauseForEdit);
|
||||||
document.getElementById("time_worked").addEventListener('blur', restartAfterEdit);
|
document.getElementById("time_worked").addEventListener('blur', restartAfterEdit);
|
||||||
|
document.getElementById("ticket_add_reply").addEventListener('click', function() {
|
||||||
|
clearTimeStorage();
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user