From 56382a450a4c5572a17dca3054bf23654013910a Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 13 Sep 2013 12:40:26 +0200 Subject: [FIX] problem with page reload after installing a module lp bug: https://launchpad.net/bugs/1214814 fixed bzr revid: nicolas.vanhoren@openerp.com-20130913104026-rxtl7h1u7vuixyvm --- addons/web/static/src/js/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 55ab5ec073d..793dbd43d76 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -808,7 +808,7 @@ instance.web.redirect = function(url, wait) { if (old === url) { window.location.reload(); } else { - window.location = url; + window.location.href = url; } }; -- cgit v1.2.3 From 6d411f706509316795ecb3eb362f0b42b2740ae6 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Fri, 13 Sep 2013 14:40:26 +0200 Subject: [FIX] really solve reload problem lp bug: https://launchpad.net/bugs/1214814 fixed bzr revid: nicolas.vanhoren@openerp.com-20130913124026-yhchgik5yznkme19 --- addons/web/static/src/js/chrome.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 793dbd43d76..11a2e58ae5b 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -805,10 +805,11 @@ instance.web.redirect = function(url, wait) { var load = function() { var old = "" + window.location; - if (old === url) { - window.location.reload(); - } else { - window.location.href = url; + var old_no_hash = old.split("#")[0]; + var url_no_hash = url.split("#")[0]; + location.assign(url); + if (old_no_hash === url_no_hash) { + location.reload(true); } }; -- cgit v1.2.3 From 5a70bc038a2fa5aeb14ac3b3d95c4e619fa4e058 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 2 Oct 2013 16:37:40 +0200 Subject: Changed base url bzr revid: nicolas.vanhoren@openerp.com-20131002143740-jr8xz6j4qgs97ztp --- addons/web/static/src/js/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 11a2e58ae5b..09694bb0c38 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -534,7 +534,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ 'login': 'admin', 'password': form_obj['create_admin_pwd'], 'login_successful': function() { - var url = '/?db=' + form_obj['db_name']; + var url = '/web?db=' + form_obj['db_name']; if (self.session.debug) { url += '&debug'; } -- cgit v1.2.3 From 685c4f4d4ca68f30d6278e319a33cb7531123486 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 18 Oct 2013 11:33:07 +0200 Subject: [FIX] dropdown menu: compute document width *before* showing the dropdown menu bzr revid: chs@openerp.com-20131018093307-plgk3y4qugv4o784 --- addons/web/static/src/js/chrome.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/chrome.js') diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 11a2e58ae5b..3727b011943 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -1247,6 +1247,7 @@ instance.web.Client = instance.web.Widget.extend({ this.$el.on('click', '.oe_dropdown_toggle', function(ev) { ev.preventDefault(); var $toggle = $(this); + var doc_width = $(document).width(); var $menu = $toggle.siblings('.oe_dropdown_menu'); $menu = $menu.size() >= 1 ? $menu : $toggle.find('.oe_dropdown_menu'); var state = $menu.is('.oe_opened'); @@ -1255,7 +1256,6 @@ instance.web.Client = instance.web.Widget.extend({ $toggle.add($menu).toggleClass('oe_opened', !state); if (!state) { // Move $menu if outside window's edge - var doc_width = $(document).width(); var offset = $menu.offset(); var menu_width = $menu.width(); var x = doc_width - offset.left - menu_width - 2; -- cgit v1.2.3