diff --git a/static/js/utils/asyncTable.js b/static/js/utils/asyncTable.js index 3f4f8da56..61a8e9cfd 100644 --- a/static/js/utils/asyncTable.js +++ b/static/js/utils/asyncTable.js @@ -48,6 +48,10 @@ throw new Error('Async Table utility cannot be setup without an element!'); } + if (element.classList.contains(ASYNC_TABLE_INITIALIZED_CLASS)) { + return false; + } + // param asyncTableDbHeader if (element.dataset.asyncTableDbHeader !== undefined) { asyncTableHeader = element.dataset.asyncTableDbHeader; @@ -337,6 +341,7 @@ callback(element); } + element.classList.add(ASYNC_TABLE_INITIALIZED_CLASS); element.classList.remove(ASYNC_TABLE_LOADING_CLASS); }).catch(function(err) { console.error(err); diff --git a/static/js/utils/checkAll.js b/static/js/utils/checkAll.js index 5a15e0ac7..1c207be34 100644 --- a/static/js/utils/checkAll.js +++ b/static/js/utils/checkAll.js @@ -30,6 +30,10 @@ throw new Error('Check All utility cannot be setup without an element!'); } + if (element.classList.contains(CHECK_ALL_INITIALIZED_CLASS)) { + return false; + } + gatherColumns(); setupCheckAllCheckbox(); diff --git a/static/js/utils/massInput.js b/static/js/utils/massInput.js index 00f873ced..8dbccdca3 100644 --- a/static/js/utils/massInput.js +++ b/static/js/utils/massInput.js @@ -38,6 +38,10 @@ throw new Error('Mass Input utility cannot be setup without an element!'); } + if (element.classList.contains(MASS_INPUT_INITIALIZED_CLASS)) { + return false; + } + massInputId = element.dataset.massInputIdent || '_'; massInputForm = element.closest('form');