[IMP] Renamed DropDownMenu to UserMenu
bzr revid: fme@openerp.com-20120229141527-tuhkt0isveefy2kp
This commit is contained in:
parent
aacfe84d5d
commit
c7809cafe7
|
@ -231,19 +231,19 @@
|
|||
border-right: 4px solid transparent;
|
||||
border-top: 4px solid #4c4c4c;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu {
|
||||
.openerp2 .oe_user_menu {
|
||||
float: right;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu li {
|
||||
.openerp2 .oe_user_menu li {
|
||||
list-style-type: none;
|
||||
float: left;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown {
|
||||
.openerp2 .oe_user_menu .oe_dropdown {
|
||||
position: relative;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown_toggle:after {
|
||||
.openerp2 .oe_user_menu .oe_dropdown_toggle:after {
|
||||
width: 0;
|
||||
height: 0;
|
||||
display: inline-block;
|
||||
|
@ -260,7 +260,7 @@
|
|||
-moz-opacity: 0.5;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown_options {
|
||||
.openerp2 .oe_user_menu .oe_dropdown_options {
|
||||
float: left;
|
||||
background: #333333;
|
||||
background: rgba(37, 37, 37, 0.9);
|
||||
|
@ -288,12 +288,12 @@
|
|||
-moz-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown_options li {
|
||||
.openerp2 .oe_user_menu .oe_dropdown_options li {
|
||||
float: none;
|
||||
display: block;
|
||||
background-color: none;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown_options li a {
|
||||
.openerp2 .oe_user_menu .oe_dropdown_options li a {
|
||||
display: block;
|
||||
padding: 4px 15px;
|
||||
clear: both;
|
||||
|
@ -301,7 +301,7 @@
|
|||
line-height: 18px;
|
||||
color: #eeeeee;
|
||||
}
|
||||
.openerp2 .oe_dropdown_menu .oe_dropdown_options li a:hover {
|
||||
.openerp2 .oe_user_menu .oe_dropdown_options li a:hover {
|
||||
background: #292929;
|
||||
background: -moz-linear-gradient(#292929, #191919);
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919));
|
||||
|
|
|
@ -242,8 +242,8 @@ $colour4: #8a89ba
|
|||
border-top: 4px solid #4c4c4c
|
||||
// }}}
|
||||
|
||||
// DropDown Menu {{{
|
||||
.oe_dropdown_menu
|
||||
// UserMenu {{{
|
||||
.oe_user_menu
|
||||
float: right
|
||||
padding: 0
|
||||
margin: 0
|
||||
|
|
|
@ -784,10 +784,10 @@ openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
|
|||
}
|
||||
});
|
||||
|
||||
openerp.web.DropDownMenu = openerp.web.Widget.extend(/** @lends openerp.web.DropDownMenu# */{
|
||||
template: "DropDownMenu",
|
||||
openerp.web.UserMenu = openerp.web.Widget.extend(/** @lends openerp.web.UserMenu# */{
|
||||
template: "UserMenu",
|
||||
/**
|
||||
* @constructs openerp.web.DropDownMenu
|
||||
* @constructs openerp.web.UserMenu
|
||||
* @extends openerp.web.Widget
|
||||
*
|
||||
* @param parent
|
||||
|
@ -876,7 +876,7 @@ openerp.web.DropDownMenu = openerp.web.Widget.extend(/** @lends openerp.web.Dro
|
|||
$(sc.binding).bind({
|
||||
'add': function (e, attrs) {
|
||||
shortcuts_ds.create(attrs, function (out) {
|
||||
var shortcut = QWeb.render('DropDownMenu.shortcut', {
|
||||
var shortcut = QWeb.render('UserMenu.shortcut', {
|
||||
shortcuts : [{
|
||||
name : attrs.name,
|
||||
id : out.result,
|
||||
|
@ -904,7 +904,7 @@ openerp.web.DropDownMenu = openerp.web.Widget.extend(/** @lends openerp.web.Dro
|
|||
sc.splice(0, sc.length);
|
||||
sc.push.apply(sc, shortcuts);
|
||||
|
||||
$(QWeb.render('DropDownMenu.shortcut', {'shortcuts': shortcuts}))
|
||||
$(QWeb.render('UserMenu.shortcut', {'shortcuts': shortcuts}))
|
||||
.appendTo(self.$element.find('.oe_dropdown_options'));
|
||||
});
|
||||
},
|
||||
|
@ -1004,7 +1004,7 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
|
|||
this.session.on_session_valid.add(function() {
|
||||
self.show_application();
|
||||
|
||||
self.dropdown_menu.do_update();
|
||||
self.user_menu.do_update();
|
||||
self.menu.do_reload();
|
||||
if(self.action_manager)
|
||||
self.action_manager.destroy();
|
||||
|
@ -1034,10 +1034,10 @@ openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClie
|
|||
self.menu = new openerp.web.Menu(self);
|
||||
self.menu.replace(this.$element.find('.oe_menu_placeholder'));
|
||||
self.menu.on_action.add(this.proxy('on_menu_action'));
|
||||
self.dropdown_menu = new openerp.web.DropDownMenu(self);
|
||||
self.dropdown_menu.replace(this.$element.find('.oe_dropdown_menu_placeholder'));
|
||||
self.dropdown_menu.on_menu_logout.add(this.proxy('on_logout'));
|
||||
self.dropdown_menu.on_action.add(this.proxy('on_menu_action'));
|
||||
self.user_menu = new openerp.web.UserMenu(self);
|
||||
self.user_menu.replace(this.$element.find('.oe_user_menu_placeholder'));
|
||||
self.user_menu.on_menu_logout.add(this.proxy('on_logout'));
|
||||
self.user_menu.on_action.add(this.proxy('on_menu_action'));
|
||||
},
|
||||
show_common: function() {
|
||||
var self = this;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="oe_webclient">
|
||||
<div class="oe_topbar">
|
||||
<div class="oe_menu_placeholder"/>
|
||||
<div class="oe_dropdown_menu_placeholder"/>
|
||||
<div class="oe_user_menu_placeholder"/>
|
||||
</div>
|
||||
<div class="oe_leftbar">
|
||||
<a href="#" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
|
||||
|
@ -364,8 +364,8 @@
|
|||
</a>
|
||||
</t>
|
||||
|
||||
<t t-name="DropDownMenu">
|
||||
<ul class="oe_dropdown_menu oe_topbar_item">
|
||||
<t t-name="UserMenu">
|
||||
<ul class="oe_user_menu oe_topbar_item">
|
||||
<li class="oe_dropdown">
|
||||
<a href="#" class="oe_dropdown_toggle">
|
||||
<img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/topbar-avatar.png'"/>
|
||||
|
@ -382,7 +382,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="DropDownMenu.shortcut">
|
||||
<t t-name="UserMenu.shortcut">
|
||||
<li t-foreach="shortcuts" t-as="shortcut">
|
||||
<a href="#" data-menu="shortcut" t-att-data-id="shortcut.res_id" t-att-data-shortcut-id="shortcut.id">
|
||||
<t t-esc="shortcut.name"/>
|
||||
|
|
Loading…
Reference in New Issue