diff options
| author | bth-openerp <bth@tinyerp.com> | 2013-10-17 18:41:39 +0530 |
|---|---|---|
| committer | bth-openerp <bth@tinyerp.com> | 2013-10-17 18:41:39 +0530 |
| commit | addc2d5f9cefc4c7cd1eb7f3abcc496f2c8eeabe (patch) | |
| tree | 9bcb89044f3ca6854b2942206b73653f52859e84 /addons/website/static/src/js/website.js | |
| parent | e3d3cf674c461b2d39418b98898e21d32c08a20d (diff) | |
| parent | d5bbf2501a08dd6b0bab0ea4e2e9ff4b0b03fed7 (diff) | |
[MERGE]Merge trunk-website-al.
bzr revid: bth@tinyerp.com-20131017131139-whjjmuin6g9cby9r
Diffstat (limited to 'addons/website/static/src/js/website.js')
| -rw-r--r-- | addons/website/static/src/js/website.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 1f4e54b43df..963a0b1664d 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -38,7 +38,12 @@ return $.when.apply(null, dones); }; website.reload = function () { - window.location.href = window.location.href.replace(/unable_editor(=[^&]*)?|#.*/g, ''); + location.hash = "scrollTop=" + window.document.body.scrollTop; + if (location.search.indexOf("unable_editor") > -1) { + window.location.href = window.location.href.replace(/unable_editor(=[^&]*)?/g, ''); + } else { + window.location.reload(); + } }; var all_ready = null; @@ -167,6 +172,11 @@ website.init_kanban(this); }); + setTimeout(function () { + if (window.location.hash.indexOf("scrollTop=") > -1) { + window.document.body.scrollTop = +location.hash.match(/scrollTop=([0-9]+)/)[1]; + } + },0); }); return website; |
