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:
committed by
Ryan Cramer
parent
965f956bc3
commit
fef2a76f39
@@ -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
Reference in New Issue
Block a user