mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add event listeners after reload (#5230)
* Add event listeners after reload. Fixes #5184 * Remove redundant fuzzy times update
This commit is contained in:
parent
5776c7ae87
commit
fde3cde007
1 changed files with 5 additions and 3 deletions
|
@ -9,7 +9,9 @@ var ready = (callback) => {
|
|||
else document.addEventListener("DOMContentLoaded", callback);
|
||||
}
|
||||
|
||||
ready(() => {
|
||||
ready(addListeners)
|
||||
|
||||
function addListeners() {
|
||||
document.querySelectorAll(".check_all").forEach(node => {
|
||||
node.addEventListener("click", event => {
|
||||
node.closest('table').querySelectorAll('input[type=checkbox]').forEach(inp => { inp.checked = !!node.checked; });
|
||||
|
@ -61,7 +63,7 @@ ready(() => {
|
|||
scheduleLivePoll();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function updateFuzzyTimes() {
|
||||
var locale = document.body.getAttribute("data-locale");
|
||||
|
@ -107,5 +109,5 @@ function replacePage(text) {
|
|||
var header_status = doc.querySelector('.status')
|
||||
document.querySelector('.status').replaceWith(header_status)
|
||||
|
||||
updateFuzzyTimes();
|
||||
addListeners();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue