1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-07 15:26:54 +02:00

Add PR #302 feat: add support for ajaxParams in ProcessPageList()

This commit is contained in:
BernhardBaumrock
2024-09-13 14:03:25 -04:00
committed by Ryan Cramer
parent 965f956bc3
commit fef2a76f39
2 changed files with 11 additions and 1 deletions

View File

@@ -96,6 +96,9 @@ $(document).ready(function() {
// URL where page move's should be posted
ajaxMoveURL: ProcessWire.config.urls.admin + 'page/sort/',
// context to pass to the ajaxURL
ajaxParams: {},
// classes for pagination
paginationClass: 'PageListPagination',
@@ -611,7 +614,14 @@ $(document).ready(function() {
"&lang=" + options.langID +
"&open=" + options.openPageIDs[0] +
"&mode=" + options.mode;
if(options.labelName.length) ajaxURL += '&labelName=' + options.labelName;
// Add params to the AJAX URL
for(var key in options.ajaxParams) {
ajaxURL += '&' + key + '=' + options.ajaxParams[key];
}
$.getJSON(ajaxURL)
.done(function(data, textStatus, jqXHR) {
processChildren(data);

File diff suppressed because one or more lines are too long