Chirag Patel (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-573117-cpa into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573117-cpa/+merge/101082
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.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573117-cpa/+merge/101082
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-573117-cpa.
=== modified file 'addons/web/static/src/js/chrome.js'
--- addons/web/static/src/js/chrome.js 2012-03-28 15:00:31 +0000
+++ addons/web/static/src/js/chrome.js 2012-04-06 10:07:21 +0000
@@ -710,6 +710,10 @@
.delegate('li', 'click', function(e) {
e.stopPropagation();
var id = $(this).data('id');
+ if (window.localStorage){
+ localStorage.setItem('oe_current_menu', id);
+ }
+ openerp.webclient.menu.open_menu(id);
self.session.active_id = id;
self.rpc('/web/menu/action', {'menu_id':id}, function(ir_menu_data) {
if (ir_menu_data.action.length){
@@ -815,6 +819,7 @@
this.folded = false;
if (window.localStorage) {
this.folded = localStorage.getItem('oe_menu_folded') === 'true';
+ this.current_menu = localStorage.getItem('oe_current_menu');
}
this.float_timeout = 700;
},
@@ -868,8 +873,10 @@
$secondary_submenu.addClass('active');
} else if ($secondary_submenu.hasClass('submenu')) {
$secondary_submenu.addClass('opened')
+ $secondary_submenu.siblings().removeClass('opened');
}
var $parent = $secondary_submenu.parent().show();
+ $secondary_submenu.parent().siblings("div").hide();
if ($parent.hasClass('oe_secondary_menu')) {
var primary_id = $parent.data('menu-parent');
$primary_menu = this.$element.find(
@@ -903,7 +910,10 @@
$clicked_menu = $(ev.currentTarget);
id = $clicked_menu.data('menu');
}
-
+
+ if ((window.localStorage) && (id != undefined)){
+ localStorage.setItem('oe_current_menu', id);
+ }
if (this.do_menu_click($clicked_menu, manual) && id) {
this.current_menu = id;
this.session.active_id = id;
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp