Jump to content

ProcessPageList loaded JS Event


Recommended Posts

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 post
Share on other sites
  • 3 weeks later...
  • 10 months later...

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 post
Share on other sites
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:

 

  • Like 1
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...