Add function to trigger all jobs after ajax call that add <div> handled by TAC (simply add an onclick="tarteaucitron.triggerJobsAfterAjaxCall();" and the browser fire again all the jobs + fix the click on the allow button if cookies are not allowed)
This commit is contained in:
parent
6f4c8d30c1
commit
1339816a1a
|
|
@ -1819,5 +1819,14 @@ var tarteaucitron = {
|
||||||
e.attachEvent("onclick", func);
|
e.attachEvent("onclick", func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"triggerJobsAfterAjaxCall": function() {
|
||||||
|
tarteaucitron.job.forEach(function(e) { tarteaucitron.job.push(e) });
|
||||||
|
var allowBtns = document.getElementsByClassName("tarteaucitronAllow");
|
||||||
|
for (i = 0; i < allowBtns.length; i++) {
|
||||||
|
tarteaucitron.addClickEventToElement(allowBtns[i], function () {
|
||||||
|
tarteaucitron.userInterface.respond(this, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue