[REV] Removed code changed not related to this branch.
authorThibault Delavallée <tde@openerp.com>
Fri, 26 Apr 2013 07:56:50 +0000 (09:56 +0200)
committerThibault Delavallée <tde@openerp.com>
Fri, 26 Apr 2013 07:56:50 +0000 (09:56 +0200)
bzr revid: tde@openerp.com-20130426075650-jxzw3h52idj2zp7y

addons/web/static/src/js/chrome.js

index 69c2604..e6870b8 100644 (file)
@@ -885,14 +885,15 @@ instance.web.Menu =  instance.web.Widget.extend({
         });
     },
     menu_loaded: function(data) {
+        var self = this;
         this.data = {data: data};
         this.renderElement();
         this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
         this.$el.on('click', 'a[data-menu]', this.on_top_menu_click);
         // Hide second level submenus
         this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').hide();
-        if (this.current_menu) {
-            this.open_menu(this.current_menu);
+        if (self.current_menu) {
+            self.open_menu(self.current_menu);
         }
         this.trigger('menu_loaded', data);
         this.has_been_loaded.resolve();