#13353 Pause and resume if edit mode is checked in the View panel

This commit is contained in:
Jorge Rincon 2024-05-06 16:06:30 +02:00
parent 841fd637b3
commit cc90847711
2 changed files with 16 additions and 0 deletions

View File

@ -1722,3 +1722,16 @@ function show_projection_period() {
$("#div_projection_period").hide();
}
}
// Paused and resume if edit mode is checked.
// eslint-disable-next-line no-unused-vars
function paused_resume_dashboard_countdown() {
$("#checkbox-edit-mode").on("click", function() {
let isChecked = $("#checkbox-edit-mode").is(":checked");
if (isChecked) {
$("#refrcounter").countdown("pause");
} else {
$("#refrcounter").countdown("resume");
}
});
}

View File

@ -94,5 +94,8 @@ echo $output;
$("#button-add-widget-"+cellId).trigger("click");
}, 500);
}
// Paused and resume if edit mode is checked.
paused_resume_dashboard_countdown();
});
</script>