diff options
| author | Antony Lesuisse <al@openerp.com> | 2012-08-21 19:12:05 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2012-08-21 19:12:05 +0200 |
| commit | 0149301e0a906be6fb108fa8ec045eddd9d9bd4b (patch) | |
| tree | 31ca51a68303f3755878716cbb948d1e65009077 /addons/web/static/src/js | |
| parent | 190518cbdc3ce3957fe091dad9ba00068e85e2be (diff) | |
[FIX] dbmanager reload on creation
The board.board bug, avoid running code from the previous database as it is automatically loaded when it's the first db.
Hide lonely topbar menu item.
bzr revid: al@openerp.com-20120821171205-od6r63cxs13aavuy
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/chrome.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index e28aa97bbf5..e8cdf8d6ab5 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -411,7 +411,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ 'login': 'admin', 'password': form_obj['create_admin_pwd'], 'login_successful': function() { - instance.webclient.show_application(); + self.do_action("reload"); }, }, }; @@ -712,6 +712,11 @@ instance.web.Menu = instance.web.Widget.extend({ this.data = data; this.renderElement(); this.limit_entries(); + // Hide toplevel item if there is only one + var $toplevel = this.$("li") + if($toplevel.length == 1) { + $toplevel.hide(); + } this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this })); this.$element.on('click', 'a[data-menu]', this.on_menu_click); // Hide second level submenus |
