mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Add add inline script support to Inputfield elements rendered with Lister per processwire/processwire-issues#112
This commit is contained in:
@@ -270,6 +270,15 @@ var ProcessLister = {
|
||||
}
|
||||
}
|
||||
|
||||
if(data.indexOf('</script>') > -1) {
|
||||
var d = document.createElement('div');
|
||||
d.innerHTML = data;
|
||||
var scripts = d.querySelectorAll('.Inputfield script');
|
||||
$(scripts).each(function() {
|
||||
$.globalEval(this.text || this.textContent || this.innerHTML || '');
|
||||
});
|
||||
}
|
||||
|
||||
// ProcessLister.results.find(".InputfieldForm").trigger('reloaded');
|
||||
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user