gingebaker Posted August 19, 2016 Share Posted August 19, 2016 Hi I wanted to extend the standard backend ProcessPageList with some custom Javascript Addons. Lets say Tooltips on some child pages list. The problem is that I could not find any JS-Event that wire/modules/Process/ProcessPageList/ProcessPageList.js fires wich I could use for that. This Event has to be fired when the whole PageList is rendered, or when a new Part via Ajax is rendered. There is an loaded() function in this Script ( https://github.com/ryancramerdesign/ProcessWire/blob/devns/wire/modules/Process/ProcessPageList/ProcessPageList.js#L306 ), but as far as I know there is now way I can "hook" into that function? Or am I wrong? Does anyone if this would be possible now? If not? Perhaps it would be possible that PageList also triggers an Javascript Event when the List is completely rendered (from ajax or the openPageData JSON in HTML)? Similar the way that Repeaters do... $inputfields.find('.Inputfield').trigger('reloaded', ['InputfieldRepeaterItemEdit']); You could then use somethink like that (taken from InputfieldPage): $(document).on("reloaded", ".InputfieldPage", function() { initInputfieldPage($(this)); }); Thanks for any information... gingebaker Link to comment Share on other sites More sharing options...
gingebaker Posted September 7, 2016 Author Share Posted September 7, 2016 Hi Just wanted to ask again. Perhaps I didn´t describe it that good. So the short version: Is there an Javascript Event that is triggered when the rendering of the Page List ( ProcessPageList ) is really completed? Thanks very much... Tom Link to comment Share on other sites More sharing options...
Raymond Geerts Posted August 3, 2017 Share Posted August 3, 2017 No answer yet, just stumbled on this topic, since i was looking for this too. Is there any way to listen, observe in javascript to fire an action when the PageList loading / rendering is completed. In that i mean on init, but also when user pagination or alike. Link to comment Share on other sites More sharing options...
tpr Posted August 3, 2017 Share Posted August 3, 2017 Not sure but I think the event is "ajaxComplete". 1 Link to comment Share on other sites More sharing options...
szabesz Posted August 3, 2017 Share Posted August 3, 2017 6 hours ago, Raymond Geerts said: Is there any way to listen, observe in javascript to fire an action when the PageList loading / rendering is completed If you are OK with a hacky solution, then DOMSubtreeModified might do it. I'm not a JS guru but a few days ago I used it to detect "AJAX update", well, sort of: 1 Link to comment Share on other sites More sharing options...
Raymond Geerts Posted August 7, 2017 Share Posted August 7, 2017 Thanks guys for the answers. Altough DOMSubtreeModified did work i found a solution that did'nt involve JS at all. But instead i made a hook to manipulate the PageList item labels. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now