mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 23:38:29 +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
|
// URL where page move's should be posted
|
||||||
ajaxMoveURL: ProcessWire.config.urls.admin + 'page/sort/',
|
ajaxMoveURL: ProcessWire.config.urls.admin + 'page/sort/',
|
||||||
|
|
||||||
|
// context to pass to the ajaxURL
|
||||||
|
ajaxParams: {},
|
||||||
|
|
||||||
// classes for pagination
|
// classes for pagination
|
||||||
paginationClass: 'PageListPagination',
|
paginationClass: 'PageListPagination',
|
||||||
@@ -611,7 +614,14 @@ $(document).ready(function() {
|
|||||||
"&lang=" + options.langID +
|
"&lang=" + options.langID +
|
||||||
"&open=" + options.openPageIDs[0] +
|
"&open=" + options.openPageIDs[0] +
|
||||||
"&mode=" + options.mode;
|
"&mode=" + options.mode;
|
||||||
|
|
||||||
if(options.labelName.length) ajaxURL += '&labelName=' + options.labelName;
|
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)
|
$.getJSON(ajaxURL)
|
||||||
.done(function(data, textStatus, jqXHR) {
|
.done(function(data, textStatus, jqXHR) {
|
||||||
processChildren(data);
|
processChildren(data);
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user