diff --git a/Views/Admin/Index.cshtml b/Views/Admin/Index.cshtml index 04f7268..caafc66 100644 --- a/Views/Admin/Index.cshtml +++ b/Views/Admin/Index.cshtml @@ -124,7 +124,7 @@ Swal.fire({ title: 'Generate Token', html: ` - + `, confirmButtonText: 'Generate', focusConfirm: false, diff --git a/Views/Home/_ExtraFields.cshtml b/Views/Home/_ExtraFields.cshtml index ca79403..ec1b25b 100644 --- a/Views/Home/_ExtraFields.cshtml +++ b/Views/Home/_ExtraFields.cshtml @@ -73,7 +73,7 @@ Swal.fire({ title: 'Field Name', html: ` - + `, confirmButtonText: 'Add', focusConfirm: false, diff --git a/Views/Home/_Settings.cshtml b/Views/Home/_Settings.cshtml index 7d12a5b..1a9ae6f 100644 --- a/Views/Home/_Settings.cshtml +++ b/Views/Home/_Settings.cshtml @@ -342,7 +342,7 @@ title: 'Setup Credentials', html: ` - + `, confirmButtonText: 'Setup', focusConfirm: false, diff --git a/Views/Vehicle/_Collaborators.cshtml b/Views/Vehicle/_Collaborators.cshtml index 2f23e22..27da881 100644 --- a/Views/Vehicle/_Collaborators.cshtml +++ b/Views/Vehicle/_Collaborators.cshtml @@ -52,7 +52,7 @@ Swal.fire({ title: 'Add Collaborator', html: ` - + `, confirmButtonText: 'Add', focusConfirm: false, diff --git a/wwwroot/js/gasrecord.js b/wwwroot/js/gasrecord.js index 656499c..9c23509 100644 --- a/wwwroot/js/gasrecord.js +++ b/wwwroot/js/gasrecord.js @@ -408,7 +408,7 @@ function searchGasTableRows() { Swal.fire({ title: 'Search Records', html: ` - + `, confirmButtonText: 'Search', focusConfirm: false, diff --git a/wwwroot/js/planrecord.js b/wwwroot/js/planrecord.js index 0ef4392..0c9edc4 100644 --- a/wwwroot/js/planrecord.js +++ b/wwwroot/js/planrecord.js @@ -281,7 +281,7 @@ function updatePlanRecordProgress(newProgress) { Swal.fire({ title: 'Mark Task as Done?', html: `

To confirm, please enter the current odometer reading on your vehicle, as we also need the current odometer to auto convert the task into the relevant record.

- + `, confirmButtonText: 'Confirm', showCancelButton: true, diff --git a/wwwroot/js/reminderrecord.js b/wwwroot/js/reminderrecord.js index 9dccc6f..172b0c8 100644 --- a/wwwroot/js/reminderrecord.js +++ b/wwwroot/js/reminderrecord.js @@ -23,7 +23,7 @@ function checkCustomMonthInterval() { Swal.fire({ title: 'Specify Custom Month Interval', html: ` - + `, confirmButtonText: 'Set', focusConfirm: false, @@ -52,7 +52,7 @@ function checkCustomMileageInterval() { Swal.fire({ title: 'Specify Custom Mileage Interval', html: ` - + `, confirmButtonText: 'Set', focusConfirm: false, diff --git a/wwwroot/js/shared.js b/wwwroot/js/shared.js index b5677fd..57e5c12 100644 --- a/wwwroot/js/shared.js +++ b/wwwroot/js/shared.js @@ -412,7 +412,7 @@ function editFileName(fileLocation, event) { Swal.fire({ title: 'Rename File', html: ` - + `, confirmButtonText: 'Rename', focusConfirm: false, @@ -925,7 +925,7 @@ function replenishSupplies() { html: `
- +
leave blank to use unit cost calculation `, @@ -985,7 +985,7 @@ function searchTableRows(tabName) { Swal.fire({ title: 'Search Records', html: ` - + `, confirmButtonText: 'Search', focusConfirm: false, @@ -1094,4 +1094,14 @@ function handleModalPaste(e, recordType) { $(`#${recordType}`)[0].files = acceptableFiles.files; $(`#${recordType}`).trigger('change'); } +} +function handleEnter(e, submitButtonName) { + if (e.which == 13) { + $(`#${submitButtonName}`).trigger('click'); + } +} +function handleSwalEnter(e) { + if (e.which == 13) { + Swal.clickConfirm(); + } } \ No newline at end of file diff --git a/wwwroot/js/taxrecord.js b/wwwroot/js/taxrecord.js index 4fca8f0..257a95a 100644 --- a/wwwroot/js/taxrecord.js +++ b/wwwroot/js/taxrecord.js @@ -104,7 +104,7 @@ function checkCustomMonthIntervalForTax() { Swal.fire({ title: 'Specify Custom Month Interval', html: ` - + `, confirmButtonText: 'Set', focusConfirm: false, diff --git a/wwwroot/js/vehicle.js b/wwwroot/js/vehicle.js index 0042b29..2142f8f 100644 --- a/wwwroot/js/vehicle.js +++ b/wwwroot/js/vehicle.js @@ -616,7 +616,7 @@ function getLastOdometerReadingAndIncrement(odometerFieldName) { Swal.fire({ title: 'Increment Last Reported Odometer Reading', html: ` - + `, confirmButtonText: 'Add', focusConfirm: false,