[IMP] Hide secondary menu on home page client action
bzr revid: fme@openerp.com-20111214104301-a2031jvoo5tek9sl
This commit is contained in:
parent
e36dc8c5e3
commit
5fd4033788
|
@ -916,6 +916,8 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
|
||||||
|
|
||||||
if (!(this.folded && manual)) {
|
if (!(this.folded && manual)) {
|
||||||
this.do_show_secondary($sub_menu, $main_menu);
|
this.do_show_secondary($sub_menu, $main_menu);
|
||||||
|
} else {
|
||||||
|
this.do_show_secondary();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($main_menu != $clicked_menu) {
|
if ($main_menu != $clicked_menu) {
|
||||||
|
@ -941,8 +943,15 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
do_hide_secondary: function() {
|
||||||
|
this.$secondary_menu.hide();
|
||||||
|
},
|
||||||
do_show_secondary: function($sub_menu, $main_menu) {
|
do_show_secondary: function($sub_menu, $main_menu) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
this.$secondary_menu.show();
|
||||||
|
if (!arguments.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this.folded) {
|
if (this.folded) {
|
||||||
var css = $main_menu.position(),
|
var css = $main_menu.position(),
|
||||||
fold_width = this.$secondary_menu.width() + 2,
|
fold_width = this.$secondary_menu.width() + 2,
|
||||||
|
|
|
@ -397,8 +397,8 @@ openerp.web_dashboard.ApplicationTiles = openerp.web.Widget.extend({
|
||||||
this._super(parent);
|
this._super(parent);
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
// TODO menu hide
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
openerp.webclient.menu.do_hide_secondary();
|
||||||
var domain = [['application','=',true], ['state','=','installed'], ['name', '!=', 'base']];
|
var domain = [['application','=',true], ['state','=','installed'], ['name', '!=', 'base']];
|
||||||
var ds = new openerp.web.DataSetSearch(this, 'ir.module.module',{},domain);
|
var ds = new openerp.web.DataSetSearch(this, 'ir.module.module',{},domain);
|
||||||
ds.read_slice(['id'], {}, function(result) {
|
ds.read_slice(['id'], {}, function(result) {
|
||||||
|
|
Loading…
Reference in New Issue