[WIP] Replaced cropdown by dropdown

bzr revid: fme@openerp.com-20120620151453-9g32rrbv3x0b1v8p
This commit is contained in:
Fabien Meghazi 2012-06-20 17:14:53 +02:00
parent d2bfcd85a3
commit f1a2b708ac
7 changed files with 47 additions and 82 deletions

View File

@ -355,14 +355,14 @@
.openerp .ui-tabs-hide {
display: none;
}
.openerp .oe_cropdown, .openerp .oe_cropdown_hover, .openerp .oe_cropdown_toggle {
.openerp .oe_dropdown, .openerp .oe_dropdown_hover, .openerp .oe_dropdown_toggle {
position: relative;
cursor: pointer;
}
.openerp .oe_cropdown_hover:hover .oe_cropdown_menu, .openerp .oe_cropdown_menu.oe_opened {
.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
display: block;
}
.openerp .oe_cropdown_menu {
.openerp .oe_dropdown_menu {
display: none;
position: absolute;
top: 28px;
@ -379,13 +379,13 @@
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.openerp .oe_cropdown_menu > li {
.openerp .oe_dropdown_menu > li {
list-style-type: none;
float: none;
display: block;
position: relative;
}
.openerp .oe_cropdown_menu > li:hover {
.openerp .oe_dropdown_menu > li:hover {
background-color: #f0f0fa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
@ -397,17 +397,17 @@
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe_cropdown_menu > li > a {
.openerp .oe_dropdown_menu > li > a {
white-space: nowrap;
display: block;
padding: 3px 6px;
color: #4c4c4c;
text-decoration: none;
}
.openerp .oe_cropdown_menu > li > a:hover {
.openerp .oe_dropdown_menu > li > a:hover {
text-decoration: none;
}
.openerp .oe_cropdown_arrow:after {
.openerp .oe_dropdown_arrow:after {
width: 0;
height: 0;
display: inline-block;
@ -425,19 +425,19 @@
.openerp .oe_sidebar {
white-space: nowrap;
}
.openerp .oe_sidebar .oe_cropdown_menu .oe_sidebar_add_attachment {
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment {
height: 20px;
cursor: pointer;
padding-left: 6px;
margin-top: 6px;
}
.openerp .oe_sidebar .oe_cropdown_menu .oe_sidebar_add_attachment span {
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment span {
font-weight: bold;
}
.openerp .oe_sidebar .oe_cropdown_menu .oe_sidebar_add_attachment .oe_hidden_input_file {
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment .oe_hidden_input_file {
width: 200px;
}
.openerp .oe_sidebar .oe_cropdown_menu .oe_sidebar_add_attachment:hover {
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment:hover {
background-color: #f0f0fa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
@ -449,7 +449,7 @@
-webkit-box-shadow: none;
box-shadow: none;
}
.openerp .oe_sidebar .oe_cropdown_menu li .oe_sidebar_delete_item {
.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item {
position: absolute;
top: 4px;
right: 4px;
@ -463,7 +463,7 @@
font-weight: bold;
text-shadow: 0 1px 1px white;
}
.openerp .oe_sidebar .oe_cropdown_menu li .oe_sidebar_delete_item:hover {
.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item:hover {
text-decoration: none;
color: white;
background: #8786b7;
@ -472,7 +472,7 @@
-webkit-border-radius: 2px;
border-radius: 2px;
}
.openerp .oe_sidebar .oe_cropdown_menu li:hover .oe_sidebar_delete_item {
.openerp .oe_sidebar .oe_dropdown_menu li:hover .oe_sidebar_delete_item {
display: inline-block;
}
.openerp .oe_loading {
@ -710,10 +710,10 @@
.openerp .oe_topbar .oe_topbar_avatar {
vertical-align: top;
}
.openerp .oe_topbar .oe_cropdown_arrow:after {
.openerp .oe_topbar .oe_dropdown_arrow:after {
border-top: 4px solid white;
}
.openerp .oe_topbar .oe_cropdown_menu {
.openerp .oe_topbar .oe_dropdown_menu {
background: #333333;
background: rgba(37, 37, 37, 0.9);
border-color: #999999;
@ -727,13 +727,13 @@
-moz-background-clip: padding-box;
background-clip: padding-box;
}
.openerp .oe_topbar .oe_cropdown_menu li {
.openerp .oe_topbar .oe_dropdown_menu li {
float: none;
}
.openerp .oe_topbar .oe_cropdown_menu li a {
.openerp .oe_topbar .oe_dropdown_menu li a {
color: #eeeeee;
}
.openerp .oe_topbar .oe_cropdown_menu li a:hover {
.openerp .oe_topbar .oe_dropdown_menu li a:hover {
background-color: #292929;
background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919));
background-image: -webkit-linear-gradient(top, #292929, #191919);
@ -792,7 +792,7 @@
list-style-type: none;
float: left;
}
.openerp .oe_user_menu .oe_cropdown_menu {
.openerp .oe_user_menu .oe_dropdown_menu {
right: -1px;
}
.openerp .oe_systray > div {
@ -1740,38 +1740,6 @@
height: inherit !important;
font-size: inherit;
}
<<<<<<< TREE
.openerp .oe_form_nosheet > *:not(.oe_form_topbar) {
margin-left: 10px !important;
margin-right: 10px !important;
}
.openerp .oe_form td.oe_form_group_cell_label {
border-right: 1px solid #dddddd;
padding: 2px 0px 2px 0px;
}
.openerp .oe_form td.oe_form_group_cell_label label {
line-height: 18px;
display: block;
min-width: 120px;
}
.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
padding-left: 8px;
}
.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
font-weight: bold;
white-space: nowrap;
padding-right: 8px;
}
.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
font-size: 80%;
color: darkGreen;
vertical-align: top;
position: relative;
top: -4px;
padding: 0 2px;
}
=======
>>>>>>> MERGE-SOURCE
.openerp .oe_form .oe_form_field {
width: 100%;
display: inline-block;
@ -1987,9 +1955,6 @@
.openerp .oe-listview-content {
width: 100%;
}
.openerp .oe-listview-content td:first-child, .openerp .oe-listview-content th:first-child {
width: 17px;
}
.openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after {
border-width: 0;
}

View File

@ -311,12 +311,12 @@ $colour4: #8a89ba
display: none
// }}}
// Dropdown {{{
.oe_cropdown, .oe_cropdown_hover, .oe_cropdown_toggle
.oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle
position: relative
cursor: pointer
.oe_cropdown_hover:hover .oe_cropdown_menu, .oe_cropdown_menu.oe_opened
.oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
display: block
.oe_cropdown_menu
.oe_dropdown_menu
display: none
position: absolute
top: 28px
@ -344,7 +344,7 @@ $colour4: #8a89ba
text-decoration: none
&:hover
text-decoration: none
.oe_cropdown_arrow:after
.oe_dropdown_arrow:after
width: 0
height: 0
display: inline-block
@ -360,7 +360,7 @@ $colour4: #8a89ba
.oe_sidebar
white-space: nowrap
.oe_cropdown_menu
.oe_dropdown_menu
.oe_sidebar_add_attachment
height: 20px
cursor: pointer
@ -575,9 +575,9 @@ $colour4: #8a89ba
@include radius(3px)
.oe_topbar_avatar
vertical-align: top
.oe_cropdown_arrow:after
.oe_dropdown_arrow:after
border-top: 4px solid white
.oe_cropdown_menu
.oe_dropdown_menu
background: #333
background: rgba(37,37,37,0.9)
border-color: #999
@ -636,7 +636,7 @@ $colour4: #8a89ba
li
list-style-type: none
float: left
.oe_cropdown_menu
.oe_dropdown_menu
right: -1px
// }}}
// Systray {{{

View File

@ -713,7 +713,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
start: function() {
var self = this;
this._super.apply(this, arguments);
this.$element.on('click', '.oe_cropdown_menu li a[data-menu]', function(ev) {
this.$element.on('click', '.oe_dropdown_menu li a[data-menu]', function(ev) {
ev.preventDefault();
var f = self['on_menu_' + $(this).data('menu')];
if (f) {
@ -862,8 +862,8 @@ instance.web.WebClient = instance.web.Widget.extend({
this.$element.on('mouseenter', '.oe_systray > div:not([data-tipsy=true])', function() {
$(this).attr('data-tipsy', 'true').tipsy().trigger('mouseenter');
});
this.$element.on('click', '.oe_cropdown_toggle', function(ev) {
var $menu = $(this).find('.oe_cropdown_menu');
this.$element.on('click', '.oe_dropdown_toggle', function(ev) {
var $menu = $(this).find('.oe_dropdown_menu');
var state = $menu.is('.oe_opened');
setTimeout(function() {
// Do not alter propagation
@ -881,7 +881,7 @@ instance.web.WebClient = instance.web.Widget.extend({
}, 0);
});
instance.web.bus.on('click', this, function() {
self.$element.find('.oe_cropdown_menu.oe_opened').removeClass('oe_opened');
self.$element.find('.oe_dropdown_menu.oe_opened').removeClass('oe_opened');
});
},
show_common: function() {

View File

@ -739,7 +739,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
var self = this;
this._super(this);
this.redraw();
this.$element.on('click','.oe_cropdown_menu li a', function(event) {
this.$element.on('click','.oe_dropdown_menu li a', function(event) {
var section = $(this).data('section');
var index = $(this).data('index');
var item = self.items[section][index];

View File

@ -273,9 +273,9 @@
</t>
<t t-name="Menu.more">
<li class="oe_menu_more_container">
<span class="oe_topbar_item oe_menu_more_link oe_cropdown_toggle oe_cropdown_arrow">
<span class="oe_topbar_item oe_menu_more_link oe_dropdown_toggle oe_dropdown_arrow">
More
<ul class="oe_menu_more oe_cropdown_menu"/>
<ul class="oe_menu_more oe_dropdown_menu"/>
</span>
</li>
</t>
@ -318,10 +318,10 @@
</t>
<t t-name="UserMenu">
<span class="oe_user_menu oe_topbar_item oe_cropdown_toggle oe_cropdown_arrow">
<span class="oe_user_menu oe_topbar_item oe_dropdown_toggle oe_dropdown_arrow">
<img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/user_menu_avatar.png'"/>
<span class="oe_topbar_name"/>
<ul class="oe_cropdown_menu">
<ul class="oe_dropdown_menu">
<li><a href="#" data-menu="about">About OpenERP</a></li>
<li><a href="#" data-menu="settings">Preferences</a></li>
<li><a href="#" data-menu="logout">Log out</a></li>
@ -508,9 +508,9 @@
<div class="oe_sidebar">
<t t-foreach="widget.sections" t-as="section">
<div class="oe_form_dropdown_section">
<button class="oe_cropdown_toggle oe_cropdown_arrow">
<button class="oe_dropdown_toggle oe_dropdown_arrow">
<t t-esc="section.label"/>
<ul class="oe_cropdown_menu">
<ul class="oe_dropdown_menu">
<li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
<a class="oe_sidebar_action_a" t-att-title="item.title" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
<t t-raw="item.label"/>

View File

@ -325,7 +325,7 @@
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
-box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}
.openerp .oe_kanban_view .oe_kanban_card:hover .oe_cropdown_kanban {
.openerp .oe_kanban_view .oe_kanban_card:hover .oe_dropdown_kanban {
display: block;
}
.openerp .oe_kanban_view .oe_kanban_card h3 {
@ -386,7 +386,7 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.openerp .oe_kanban_view .oe_cropdown_kanban {
.openerp .oe_kanban_view .oe_dropdown_kanban {
position: absolute;
top: -8px;
right: 3px;
@ -394,10 +394,10 @@
color: #4c4c4c;
cursor: pointer;
}
.openerp .oe_kanban_view .oe_cropdown_kanban:hover {
.openerp .oe_kanban_view .oe_dropdown_kanban:hover {
text-decoration: none;
}
.openerp .oe_kanban_view .oe_cropdown_kanban .oe_cropdown_menu {
.openerp .oe_kanban_view .oe_dropdown_kanban .oe_dropdown_menu {
right: -140px;
min-width: 160px;
}

View File

@ -280,7 +280,7 @@
margin-bottom: 0
&:hover
@include box-shadow(0 0 3px rgba(0,0,0,0.6))
.oe_cropdown_kanban
.oe_dropdown_kanban
display: block
h3
margin: 0 16px 0 0
@ -319,7 +319,7 @@
white-space: nowrap
// }}}
// KanbanDropDown {{{
.oe_cropdown_kanban
.oe_dropdown_kanban
position: absolute
top: -8px
right: 3px
@ -328,7 +328,7 @@
cursor: pointer
&:hover
text-decoration: none
.oe_cropdown_menu
.oe_dropdown_menu
right: -140px
min-width: 160px
// }}}