| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /**
- * Main Javascript file
- *
- * @author Open Mind
- * @date 04/12/2018
- * @time 16:00
- */
- var fetchHeaders = {
- 'Accept': 'text/html',
- 'Content-Type': 'text/html',
- 'X-Requested-With': 'XMLHttpRequest',
- 'Cache-Control': 'no-cache',
- 'Pragma': 'no-cache',
- 'Expires': '0'
- };
- function SetupConfirmationDialog() {
- $('.requestconfirm').on('click', function (ev) {
- let confirmText = $(this).data('confirmtext');
- if (!confirm(confirmText))
- ev.preventDefault();
- });
- }
- function SetupSubmitFormDisabler() {
- $('body').on('submit', 'form', function () {
- $('body').focus();
- $('form input,form select').prop('readonly', true);
- // Manual submit for more control
- this.submit();
- return false;
- });
- }
- $(function () {
- SetupConfirmationDialog();
- SetupSubmitFormDisabler();
- });
|