[MERGE] Merged with branch holding need_action counter display in menus.
bzr revid: tde@openerp.com-20120406102956-road14vsjwlaaxn6
This commit is contained in:
@@ -875,13 +875,13 @@ class Menu(openerpweb.Controller):
|
||||
context = req.session.eval_context(req.context)
|
||||
Menus = req.session.model('ir.ui.menu')
|
||||
|
||||
menu_roots = Menus.read(self.do_get_user_roots(req), ['name', 'sequence', 'parent_id', 'action'], context)
|
||||
menu_roots = Menus.read(self.do_get_user_roots(req), ['name', 'sequence', 'parent_id', 'action', 'needaction_enabled', 'needaction_counter'], context)
|
||||
menu_root = {'id': False, 'name': 'root', 'parent_id': [-1, ''], 'children' : menu_roots}
|
||||
|
||||
# menus are loaded fully unlike a regular tree view, cause there are a
|
||||
# limited number of items (752 when all 6.1 addons are installed)
|
||||
menu_ids = Menus.search([], 0, False, False, context)
|
||||
menu_items = Menus.read(menu_ids, ['name', 'sequence', 'parent_id', 'action'], context)
|
||||
menu_items = Menus.read(menu_ids, ['name', 'sequence', 'parent_id', 'action', 'needaction_enabled', 'needaction_counter'], context)
|
||||
# adds roots at the end of the sequence, so that they will overwrite
|
||||
# equivalent menu items from full menu read when put into id:item
|
||||
# mapping, resulting in children being correctly set on the roots.
|
||||
|
||||
@@ -220,6 +220,19 @@
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.openerp2 .oe_secondary_submenu .oe_menu_counter {
|
||||
float: right;
|
||||
background: #8a89ba;
|
||||
color: #eeeeee;
|
||||
font-size: 12px;
|
||||
border: 1px solid lightgray;
|
||||
padding: 0px 4px 0px 4px;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
margin: 0px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.openerp2 .oe_secondary_submenu .oe_active {
|
||||
background: #8a89ba;
|
||||
border-top: 1px solid lightGray;
|
||||
@@ -240,6 +253,10 @@
|
||||
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.openerp2 .oe_secondary_submenu .oe_active .oe_menu_counter {
|
||||
background: #eeeeee;
|
||||
color: #8a89ba;
|
||||
}
|
||||
.openerp2 .oe_secondary_submenu .oe_menu_toggler:before {
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
@@ -238,6 +238,16 @@ $colour4: #8a89ba
|
||||
text-shadow: 0 1px 1px rgba(0,0,0,0.2)
|
||||
@include radius(4px)
|
||||
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
|
||||
.oe_menu_counter
|
||||
float: right
|
||||
background: #8a89ba
|
||||
color: #eee
|
||||
font-size: 12px
|
||||
border: 1px solid lightgray
|
||||
padding: 0px 4px 0px 4px
|
||||
text-shadow: 0 1px 1px rgba(0,0,0,0.2)
|
||||
margin: 0px
|
||||
@include radius(4px)
|
||||
.oe_active
|
||||
background: $colour4
|
||||
border-top: 1px solid lightGray
|
||||
@@ -251,6 +261,9 @@ $colour4: #8a89ba
|
||||
color: $colour4
|
||||
text-shadow: 0 1px 1px white
|
||||
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2))
|
||||
.oe_menu_counter
|
||||
background: #eee
|
||||
color: #8a89ba
|
||||
.oe_menu_toggler:before
|
||||
width: 0
|
||||
height: 0
|
||||
|
||||
@@ -368,6 +368,11 @@
|
||||
t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
|
||||
t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
|
||||
<t t-esc="menu.name"/>
|
||||
<t t-if="menu.needaction_enabled">
|
||||
<div class="oe_menu_counter">
|
||||
<t t-esc="menu.needaction_counter"/>
|
||||
</div>
|
||||
</t>
|
||||
</a>
|
||||
</t>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user