mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Update inputfields.js dependences so that they can work with Page selection fields (PageAutocomplete, PageListSelect, etc.) when used outside of an InputfieldPage, such as in a module config, field config, etc. Related to processwire/processwire-issues#1873
This commit is contained in:
@@ -1359,7 +1359,8 @@ function InputfieldDependencies($target) {
|
|||||||
} else if(typeof value == 'array') {
|
} else if(typeof value == 'array') {
|
||||||
// array, already
|
// array, already
|
||||||
values = value;
|
values = value;
|
||||||
} else if(typeof value == "string" && $inputfield.hasClass('InputfieldPage') && value.indexOf(',') > -1 && value.match(/^[,0-9]+$/)) {
|
} else if(typeof value == "string" && $inputfield.attr('class').indexOf('InputfieldPage') > -1
|
||||||
|
&& value.indexOf(',') > -1 && value.match(/^[,0-9]+$/)) {
|
||||||
// CSV string of page IDs
|
// CSV string of page IDs
|
||||||
values = value.split(',');
|
values = value.split(',');
|
||||||
} else {
|
} else {
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user