diff options
| author | Christophe Matthieu <chm@openerp.com> | 2013-07-26 11:26:43 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@openerp.com> | 2013-07-26 11:26:43 +0200 |
| commit | 8bc4e0e8a407c6a7f9fe5261ca5a7ffd062d889a (patch) | |
| tree | fd299cb8642e95ba95502daaf6f637d06638c216 /addons/website/static | |
| parent | 6a9bbba17e2664f60000c12950626e024b7eb9a8 (diff) | |
[IMP] remove client action goBack and add client action redirect
bzr revid: chm@openerp.com-20130726092643-onck6ad1e2aj7gbo
Diffstat (limited to 'addons/website/static')
| -rw-r--r-- | addons/website/static/src/js/website.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 34c866cc3b9..0ebb564c200 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -184,13 +184,12 @@ $(function(){ }); -/** - * Client action to go back in global history. - * If can't go back in history stack, will go back to home. - */ -instance.web.ActionGoBack = function(parent, action) { - window.location.href = document.referrer; +instance.web.ActionRedirect = function(parent, action) { + var url = $.deparam(window.location.href).url; + if (url) { + window.location.href = url; + } }; -instance.web.client_actions.add("goback", "instance.web.ActionGoBack"); +instance.web.client_actions.add("redirect", "instance.web.ActionRedirect"); }; |
