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.
| Comment | File | Size | Author |
|---|---|---|---|
| popups_js_redirect_orignal_window.patch | 645 bytes | mhrabovcin |
Comments
Comment #1
starbow commentedInteresting idea. I think this has potential.
Comment #2
mhrabovcin commentedAlso 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.