jquery-pjax icon indicating copy to clipboard operation
jquery-pjax copied to clipboard

Allow to change context in a `pjax:beforeReplace` handler

Open AntonTyutin opened this issue 11 years ago • 3 comments

AntonTyutin avatar Sep 04 '14 14:09 AntonTyutin

What's the use case?

Also, this requires tests.

mislav avatar Sep 04 '14 20:09 mislav

Hi, @mislav

My use case is: when popup form was successfully submitted the server returns a content which used to refresh the "main" container (redirect-to-list in no-pjax scenario). I can detect this outcome in pjax:beforeReplace event handler and substitute the target context.

I've appended a test to a previous commit.

AntonTyutin avatar Sep 05 '14 05:09 AntonTyutin

@mislav and @AntonTyutin the pull request I have proposed here https://github.com/defunkt/jquery-pjax/pull/428 I believe satisfies the needs of both.

jspizziri avatar Nov 11 '14 16:11 jspizziri