Jump to content

Recommended Posts

Posted

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

  • 3 weeks later...
Posted

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

 

  • 10 months later...
Posted

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.

Posted
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
Posted

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.

  • Like 1

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...