In some cases we need to complete redirect on original page, i.e. user is registred via popup on main page. On old behavior, main page is reloaded, but we need to redirect user to his own page, to fill form with user details.

I've made some simple patch which support that, when data.path on ajax form submit reaches the options.forceReturn. Not sure if this is good.

CommentFileSizeAuthor
popups_js_redirect_orignal_window.patch645 bytesmhrabovcin

Comments

starbow’s picture

Status: Needs work » Needs review

Interesting idea. I think this has potential.

mhrabovcin’s picture

Also maybe good change can be to include regular expressions for force return. As an example before, for user edit we don't have one url, but URL with argument. Write something like /user\/\d+\/edit/ to forceReturn and test regex against data.path, instead of comparing strings.