mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 17:54:44 +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);
|
||||
$spinner.fadeIn('fast');
|
||||
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() {
|
||||
$loading.remove();
|
||||
});
|
||||
@@ -537,11 +537,14 @@ $(document).ready(function() {
|
||||
$listRoot.append($children);
|
||||
$target.append($listRoot);
|
||||
|
||||
} else if($target.is(".PageList")) {
|
||||
} else if($target.hasClass('PageList')) {
|
||||
|
||||
var $newChildren = $children.children(".PageListItem, .PageListActions");
|
||||
if(replace) $target.children(".PageListItem, .PageListActions").replaceWith($newChildren);
|
||||
else $target.append($newChildren);
|
||||
if(replace) {
|
||||
// $target.children(".PageListItem, .PageListActions").replaceWith($newChildren); // doesn't work w/jQuery 1.9+
|
||||
$target.children('.PageListItem, .PageListActions').remove();
|
||||
}
|
||||
$target.append($newChildren);
|
||||
|
||||
} else {
|
||||
$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:
|
||||
* /wire/core/Process.php
|
||||
*
|
||||
* ProcessWire 3.x, Copyright 2019 by Ryan Cramer
|
||||
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
|
||||
* https://processwire.com
|
||||
*
|
||||
* @property bool $showRootPage Whether root page (like home) should be shown.
|
||||
@@ -41,7 +41,7 @@ class ProcessPageList extends Process implements ConfigurableModule {
|
||||
return array(
|
||||
'title' => 'Page List',
|
||||
'summary' => 'List pages in a hierarchical tree structure',
|
||||
'version' => 122,
|
||||
'version' => 123,
|
||||
'permanent' => true,
|
||||
'permission' => 'page-edit',
|
||||
'icon' => 'sitemap',
|
||||
|
Reference in New Issue
Block a user