mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 01:04:16 +02:00
Correct issue in JqueryUI/modal.js where it used $() rather than jQuery() in one spot, and also fix issue where modal would stay open in some cases when we didn't want it to
This commit is contained in:
@@ -188,7 +188,7 @@ function pwModalWindow(href, options, size) {
|
||||
$iframe.data('settings', settings);
|
||||
$iframe.load(function() {
|
||||
if(typeof settings.title == "undefined" || !settings.title) {
|
||||
var title = $('<textarea />').text($iframe.contents().find('title').text()).html();
|
||||
var title = jQuery('<textarea />').text($iframe.contents().find('title').text()).html();
|
||||
$iframe.dialog('option', 'title', title);
|
||||
}
|
||||
$iframe.contents().find('form').css('-webkit-backface-visibility', 'hidden'); // to prevent jumping
|
||||
@@ -332,7 +332,8 @@ function pwModalOpenEvent(e) {
|
||||
|
||||
if(closeOnLoad) {
|
||||
// this occurs when item saved and resulting page is loaded
|
||||
if($icontents.find(".NoticeError, .NoticeWarning, .ui-state-error").length == 0) {
|
||||
var $errorItems = $icontents.find(".NoticeError, .ui-state-error");
|
||||
if($errorItems.length == 0) {
|
||||
// if there are no error messages present, close the window
|
||||
if(typeof Notifications != "undefined") {
|
||||
var messages = [];
|
||||
@@ -347,6 +348,9 @@ function pwModalOpenEvent(e) {
|
||||
}
|
||||
$iframe.dialog('close');
|
||||
return;
|
||||
} else {
|
||||
// console.log('error items prevent modal autoclose:');
|
||||
// console.log($errorItems);
|
||||
}
|
||||
}
|
||||
|
||||
|
2
wire/modules/Jquery/JqueryUI/modal.min.js
vendored
2
wire/modules/Jquery/JqueryUI/modal.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user