summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js/website.js')
-rw-r--r--addons/website/static/src/js/website.js12
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;