1
0
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:
Ryan Cramer
2018-06-12 07:12:04 -04:00
parent 9ac3bfb5ad
commit 738c2db3c5
2 changed files with 7 additions and 3 deletions

View File

@@ -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);
}
}

File diff suppressed because one or more lines are too long