diff options
Diffstat (limited to 'js/src/main.js')
-rw-r--r-- | js/src/main.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/main.js b/js/src/main.js new file mode 100644 index 0000000000..9a00241c04 --- /dev/null +++ b/js/src/main.js @@ -0,0 +1,10 @@ +window.AJAX.registerOnload('functions.js', () => window.AJAX.removeSubmitEvents()); +$(window.AJAX.loadEventHandler()); + +/** + * Attach a generic event handler to clicks on pages and submissions of forms. + */ +$(document).on('click', 'a', window.AJAX.requestHandler); +$(document).on('submit', 'form', window.AJAX.requestHandler); + +$(document).on('ajaxError', window.AJAX.getFatalErrorHandler()); |