Merge lp:~openerp-dev/openerp-web/6.1-opw-573117-cpa into lp:openerp-web/6.1

Proposed by Chirag Patel (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-573117-cpa
Merge into: lp:openerp-web/6.1
Diff against target: 46 lines (+12/-1)
1 file modified
addons/web/static/src/js/chrome.js (+12/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-573117-cpa
Reviewer Review Type Date Requested Status
Jiten (OpenERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+101082@code.launchpad.net

Description of the change

Hello,

Fixed left menu hide when page refresh and menu not refresh when click on shortcut link.

Demo: Accounting > Customers > Customer Invoices
1) Refresh page.

Observed: Left menu hide.
Expected: Accounting menu must be display.

Demo:
1) Click on any shortcut link.

Observed: Left menu not refresh.
Expected: Left menu should replace with clicked link menu.

Thanks.

To post a comment you must log in.
Revision history for this message
Jiten (OpenERP) (jiten-openerp) :
review: Approve
2299. By Chirag Patel (OpenERP)

[Fix] Fixed left menu not display when click on shortcut from home page.

2300. By Chirag Patel (OpenERP)

[FIX] Fixed toggle button not display in left menu.

Unmerged revisions

2300. By Chirag Patel (OpenERP)

[FIX] Fixed toggle button not display in left menu.

2299. By Chirag Patel (OpenERP)

[Fix] Fixed left menu not display when click on shortcut from home page.

2298. By Chirag Patel (OpenERP)

[FIX] Fixed left menu hide when page refresh and menu not refresh when click on shortcut link.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/chrome.js'
2--- addons/web/static/src/js/chrome.js 2012-07-05 10:27:24 +0000
3+++ addons/web/static/src/js/chrome.js 2012-08-31 05:10:23 +0000
4@@ -724,6 +724,11 @@
5 .delegate('li', 'click', function(e) {
6 e.stopPropagation();
7 var id = $(this).data('id');
8+ if (window.localStorage){
9+ localStorage.setItem('oe_current_menu', id);
10+ }
11+ openerp.webclient.menu.open_menu(id);
12+ openerp.webclient.menu.do_show_secondary();
13 self.session.active_id = id;
14 self.rpc('/web/menu/action', {'menu_id':id}, function(ir_menu_data) {
15 if (ir_menu_data.action.length){
16@@ -829,6 +834,7 @@
17 this.folded = false;
18 if (window.localStorage) {
19 this.folded = localStorage.getItem('oe_menu_folded') === 'true';
20+ this.current_menu = localStorage.getItem('oe_current_menu');
21 }
22 this.float_timeout = 700;
23 },
24@@ -882,8 +888,10 @@
25 $secondary_submenu.addClass('active');
26 } else if ($secondary_submenu.hasClass('submenu')) {
27 $secondary_submenu.addClass('opened')
28+ $secondary_submenu.siblings().removeClass('opened');
29 }
30 var $parent = $secondary_submenu.parent().show();
31+ $secondary_submenu.parent().siblings("div:not(:first)").hide();
32 if ($parent.hasClass('oe_secondary_menu')) {
33 var primary_id = $parent.data('menu-parent');
34 $primary_menu = this.$element.find(
35@@ -917,7 +925,10 @@
36 $clicked_menu = $(ev.currentTarget);
37 id = $clicked_menu.data('menu');
38 }
39-
40+
41+ if ((window.localStorage) && (id != undefined)){
42+ localStorage.setItem('oe_current_menu', id);
43+ }
44 if (this.do_menu_click($clicked_menu, manual) && id) {
45 this.current_menu = id;
46 this.session.active_id = id;