Use data-onclick instead of data-on-click-this. Load form by id instead of passed in element. Fixes #3250
This commit is contained in:
parent
1caeb67a3e
commit
4c99baf725
|
@ -1,11 +1,15 @@
|
|||
var exportTimer = null;
|
||||
|
||||
function configureExportButton(element) {
|
||||
var form = element.form;
|
||||
function configureExportButton() {
|
||||
var form = $j('#contentForm')[0];
|
||||
if (!form) {
|
||||
console.error("Form contentForm not found by jquery.");
|
||||
return;
|
||||
}
|
||||
|
||||
var eventCount = 0;
|
||||
document.querySelectorAll('input[name="eids[]"]').forEach(function(el) {
|
||||
if ( el.checked ) {
|
||||
if (el.checked) {
|
||||
eventCount ++;
|
||||
}
|
||||
});
|
||||
|
@ -93,7 +97,7 @@ function getEventDetailModal(eid) {
|
|||
}
|
||||
|
||||
function initPage() {
|
||||
configureExportButton(this);
|
||||
configureExportButton();
|
||||
if ( exportReady ) {
|
||||
setTimeout(startDownload, 1500, exportFile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue