Fix unresponsive modal submit buttons in Safari
This commit is contained in:
parent
457b6f6971
commit
703956c3da
|
@ -96,7 +96,16 @@
|
||||||
var $form = $(event.currentTarget).closest('form');
|
var $form = $(event.currentTarget).closest('form');
|
||||||
var $modal = $form.closest('#modal');
|
var $modal = $form.closest('#modal');
|
||||||
|
|
||||||
var req = _this.icinga.loader.submitForm($form, $autoSubmittedBy);
|
var $button;
|
||||||
|
var $rememberedSubmittButton = $form.data('submitButton');
|
||||||
|
if (typeof $rememberedSubmittButton != 'undefined') {
|
||||||
|
if ($form.has($rememberedSubmittButton)) {
|
||||||
|
$button = $rememberedSubmittButton;
|
||||||
|
}
|
||||||
|
$form.removeData('submitButton');
|
||||||
|
}
|
||||||
|
|
||||||
|
var req = _this.icinga.loader.submitForm($form, $autoSubmittedBy, $button);
|
||||||
req.addToHistory = false;
|
req.addToHistory = false;
|
||||||
req.$redirectTarget = $modal.data('redirectTarget');
|
req.$redirectTarget = $modal.data('redirectTarget');
|
||||||
req.done(function (data, textStatus, req) {
|
req.done(function (data, textStatus, req) {
|
||||||
|
|
|
@ -195,6 +195,10 @@
|
||||||
// .closest is not required unless subelements to trigger this
|
// .closest is not required unless subelements to trigger this
|
||||||
var $form = $(event.currentTarget).closest('form');
|
var $form = $(event.currentTarget).closest('form');
|
||||||
|
|
||||||
|
if ($form.closest('[data-no-icinga-ajax]').length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
var $button;
|
var $button;
|
||||||
var $rememberedSubmittButton = $form.data('submitButton');
|
var $rememberedSubmittButton = $form.data('submitButton');
|
||||||
if (typeof $rememberedSubmittButton != 'undefined') {
|
if (typeof $rememberedSubmittButton != 'undefined') {
|
||||||
|
@ -204,10 +208,6 @@
|
||||||
$form.removeData('submitButton');
|
$form.removeData('submitButton');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($form.closest('[data-no-icinga-ajax]').length > 0) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof $button === 'undefined') {
|
if (typeof $button === 'undefined') {
|
||||||
var $el;
|
var $el;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue