diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-24 17:19:29 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-07-24 17:19:29 +0200 |
| commit | b105770bbc0f545a4dfd0482b5b310f534fc1033 (patch) | |
| tree | 6efa110c9ad0d88fd88659af95e5df85bedac019 /addons/web/static | |
| parent | a3f57cd43b4f6cd00ce06564f7fde1dbb6598d5f (diff) | |
[IMP] removed hack to force disable the browser's cache and use http headers instead
bzr revid: nicolas.vanhoren@openerp.com-20130724151929-8j1bo1ae64lwkxdw
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 16 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 036f57eee7a..89c44a9b7ed 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -792,10 +792,17 @@ instance.web.redirect = function(url, wait) { instance.client.crashmanager.active = false; } - var wait_server = function() { - instance.session.rpc("/web/webclient/version_info", {}).done(function() { + var load = function() { + var old = "" + window.location; + if (old === url) { + window.location.reload(); + } else { window.location = url; - }).fail(function() { + } + }; + + var wait_server = function() { + instance.session.rpc("/web/webclient/version_info", {}).done(load).fail(function() { setTimeout(wait_server, 250); }); }; @@ -803,7 +810,7 @@ instance.web.redirect = function(url, wait) { if (wait) { setTimeout(wait_server, 1000); } else { - window.location = url; + load(); } }; @@ -818,7 +825,6 @@ instance.web.Reload = function(parent, action) { var l = window.location; var sobj = $.deparam(l.search.substr(1)); - sobj.ts = new Date().getTime(); if (params.url_search) { sobj = _.extend(sobj, params.url_search); } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 643bca0e798..fb622b056a1 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -459,7 +459,7 @@ <tr> <td class="oe_leftbar" valign="top"> <t t-set="debug" t-value="__debug__ ? '&debug' : ''"/> - <a class="oe_logo" t-attf-href="/?ts=#{Date.now()}#{debug}"> + <a class="oe_logo" t-attf-href="/?#{debug}"> <span class="oe_logo_edit">Edit Company data</span> <img t-att-src='widget.session.url("/web/binary/company_logo")'/> </a> |
