mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 02:04:35 +02:00
Update ProcessPageList.js so that pagination links work correctly with newer jQuery versions
This commit is contained in:
@@ -412,7 +412,7 @@ $(document).ready(function() {
|
|||||||
$newList.append($loading);
|
$newList.append($loading);
|
||||||
$spinner.fadeIn('fast');
|
$spinner.fadeIn('fast');
|
||||||
var $siblings = $newList.siblings().css('opacity', 0.5);
|
var $siblings = $newList.siblings().css('opacity', 0.5);
|
||||||
loadChildren(id, $newList.parent(), $(this).attr('href') * info.limit, false, false, true, function() {
|
loadChildren(id, $newList.parent(), start, false, false, true, function() {
|
||||||
$spinner.fadeOut('fast', function() {
|
$spinner.fadeOut('fast', function() {
|
||||||
$loading.remove();
|
$loading.remove();
|
||||||
});
|
});
|
||||||
@@ -537,11 +537,14 @@ $(document).ready(function() {
|
|||||||
$listRoot.append($children);
|
$listRoot.append($children);
|
||||||
$target.append($listRoot);
|
$target.append($listRoot);
|
||||||
|
|
||||||
} else if($target.is(".PageList")) {
|
} else if($target.hasClass('PageList')) {
|
||||||
|
|
||||||
var $newChildren = $children.children(".PageListItem, .PageListActions");
|
var $newChildren = $children.children(".PageListItem, .PageListActions");
|
||||||
if(replace) $target.children(".PageListItem, .PageListActions").replaceWith($newChildren);
|
if(replace) {
|
||||||
else $target.append($newChildren);
|
// $target.children(".PageListItem, .PageListActions").replaceWith($newChildren); // doesn't work w/jQuery 1.9+
|
||||||
|
$target.children('.PageListItem, .PageListActions').remove();
|
||||||
|
}
|
||||||
|
$target.append($newChildren);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$target.after($children);
|
$target.after($children);
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@
|
|||||||
* For more details about how Process modules work, please see:
|
* For more details about how Process modules work, please see:
|
||||||
* /wire/core/Process.php
|
* /wire/core/Process.php
|
||||||
*
|
*
|
||||||
* ProcessWire 3.x, Copyright 2019 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
|
||||||
* https://processwire.com
|
* https://processwire.com
|
||||||
*
|
*
|
||||||
* @property bool $showRootPage Whether root page (like home) should be shown.
|
* @property bool $showRootPage Whether root page (like home) should be shown.
|
||||||
@@ -41,7 +41,7 @@ class ProcessPageList extends Process implements ConfigurableModule {
|
|||||||
return array(
|
return array(
|
||||||
'title' => 'Page List',
|
'title' => 'Page List',
|
||||||
'summary' => 'List pages in a hierarchical tree structure',
|
'summary' => 'List pages in a hierarchical tree structure',
|
||||||
'version' => 122,
|
'version' => 123,
|
||||||
'permanent' => true,
|
'permanent' => true,
|
||||||
'permission' => 'page-edit',
|
'permission' => 'page-edit',
|
||||||
'icon' => 'sitemap',
|
'icon' => 'sitemap',
|
||||||
|
Reference in New Issue
Block a user