mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +02:00
Update lots of core .js files for jQuery 3.6.4 support
This commit is contained in:
@@ -19,7 +19,7 @@ var ProcessWireAdmin = {
|
||||
},
|
||||
|
||||
setupNotices: function() {
|
||||
$(".pw-notice-group-toggle").click(function() {
|
||||
$(".pw-notice-group-toggle").on('click', function() {
|
||||
var $parent = $(this).closest('.pw-notice-group-parent');
|
||||
var $children = $parent.nextUntil('.pw-notice-group-parent');
|
||||
if($parent.hasClass('pw-notice-group-open')) {
|
||||
@@ -46,7 +46,7 @@ var ProcessWireAdmin = {
|
||||
my: "center bottom", // bottom-20
|
||||
at: "center top"
|
||||
}
|
||||
}).hover(function() {
|
||||
}).on('mouseenter', function() {
|
||||
var $a = $(this);
|
||||
if($a.is('a')) {
|
||||
$a.addClass('ui-state-hover');
|
||||
@@ -56,7 +56,7 @@ var ProcessWireAdmin = {
|
||||
}
|
||||
$a.addClass('pw-tooltip-hover');
|
||||
$a.css('cursor', 'pointer');
|
||||
}, function() {
|
||||
}).on('mouseleave', function() {
|
||||
var $a = $(this);
|
||||
$a.removeClass('pw-tooltip-hover ui-state-hover');
|
||||
if(!$a.is('a')) {
|
||||
@@ -135,7 +135,7 @@ var ProcessWireAdmin = {
|
||||
if($a.is('button')) {
|
||||
if($a.find('.ui-button-text').length == 0) $a.button();
|
||||
if($a.attr('type') == 'submit') {
|
||||
$a.click(function() {
|
||||
$a.on('click', function() {
|
||||
$a.addClass('pw-dropdown-disabled');
|
||||
setTimeout(function() {
|
||||
$a.removeClass('pw-dropdown-disabled');
|
||||
@@ -147,7 +147,7 @@ var ProcessWireAdmin = {
|
||||
}
|
||||
|
||||
// hide nav when an item is selected to avoid the whole nav getting selected
|
||||
$ul.find('a').click(function() {
|
||||
$ul.find('a').on('click', function() {
|
||||
$ul.hide();
|
||||
return true;
|
||||
});
|
||||
@@ -171,10 +171,10 @@ var ProcessWireAdmin = {
|
||||
$a.removeClass('hover pw-dropdown-toggle-open');
|
||||
}, 1000);
|
||||
}
|
||||
$ul.mouseleave(mouseleaver);
|
||||
$a.mouseleave(mouseleaver);
|
||||
$ul.on('mouseleave', mouseleaver);
|
||||
$a.on('mouseleave', mouseleaver);
|
||||
} else {
|
||||
$ul.mouseleave(function() {
|
||||
$ul.on('mouseleave', function() {
|
||||
//if($a.is(":hover")) return;
|
||||
//if($a.filter(":hover").length) return;
|
||||
$ul.hide();
|
||||
@@ -202,7 +202,7 @@ var ProcessWireAdmin = {
|
||||
$('.pw-dropdown-toggle-open').each(function() {
|
||||
var $a = $(this);
|
||||
var $ul = $a.data('pw-dropdown-ul');
|
||||
$ul.mouseleave();
|
||||
$ul.trigger('mouseleave');
|
||||
});
|
||||
$a.addClass('pw-dropdown-toggle-open');
|
||||
/*
|
||||
@@ -408,14 +408,14 @@ var ProcessWireAdmin = {
|
||||
if(typeof href != "undefined" && href.length > 1) {
|
||||
return true;
|
||||
} else {
|
||||
$item.mouseleave();
|
||||
$item.trigger('mouseleave');
|
||||
}
|
||||
} else {
|
||||
var datafrom = $item.attr('data-from');
|
||||
if(typeof datafrom == "undefined") var datafrom = '';
|
||||
if(datafrom.indexOf('topnav') > -1) {
|
||||
var from = datafrom.replace('topnav-', '') + '-';
|
||||
$("a.pw-dropdown-toggle.hover:not('." + from + "')").attr('data-touchCnt', 0).mouseleave();
|
||||
$("a.pw-dropdown-toggle.hover:not('." + from + "')").attr('data-touchCnt', 0).trigger('mouseleave');
|
||||
}
|
||||
$item.mouseenter();
|
||||
}
|
||||
|
Reference in New Issue
Block a user