Many small improvements to Kanban view

bzr revid: mit@openerp.com-20120629160606-8dyxa381pm3xcde6
This commit is contained in:
Minh Tran 2012-06-29 18:06:06 +02:00
parent dd2b3227a8
commit b864de994b
6 changed files with 84 additions and 50 deletions

View File

@ -950,10 +950,8 @@
border-right: 4px solid transparent;
border-top: 4px solid #4c4c4c;
}
.openerp .oe_application {
width: 100%;
}
.openerp .oe_application a {
width: 100%;
color: #8a89ba;
}
.openerp .oe_application a:hover {
@ -1158,7 +1156,7 @@
.openerp .oe_searchview input, .openerp .oe_searchview textarea {
padding: 3px;
height: 14px;
font-size: 11px;
font-size: 12px;
line-height: 18px;
}
.openerp .oe_searchview.oe_focused {

View File

@ -363,7 +363,6 @@ $colour4: #8a89ba
border-right: 4px solid transparent
border-top: 4px solid#404040
@include opacity(0.5)
.oe_sidebar
white-space: nowrap
.oe_dropdown_menu
@ -755,8 +754,8 @@ $colour4: #8a89ba
// }}}
// ActionManager {{{
.oe_application
width: 100%
a
width: 100%
color: $colour4
&:hover
text-decoration: underline
@ -917,7 +916,7 @@ $colour4: #8a89ba
input, textarea
padding: 3px
height: 14px
font-size: 11px
font-size: 12px
line-height: 18px
&.oe_focused
border-color: $facets-border-selected

View File

@ -15,24 +15,40 @@
.openerp .oe_kanban_view .oe_kanban_clear {
clear: both;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_on, .openerp .oe_kanban_view .oe_kanban_content .oe_star_off {
color: #cccccc;
text-shadow: 0 0 2px black;
vertical-align: top;
position: relative;
top: -5px;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_on:hover, .openerp .oe_kanban_view .oe_kanban_content .oe_star_off:hover {
text-decoration: none;
}
.openerp .oe_kanban_view .oe_kanban_content .oe_star_on {
color: gold;
}
.openerp .oe_kanban_view .oe_kanban_content div:first-child {
margin-right: 12px;
}
.openerp .oe_kanban_view .oe_kanban_button_new {
color: white;
background: #dc5f59;
}
.openerp .oe_kanban_view .oe_kanban_groups {
height: inherit;
width: 100%;
}
.openerp .oe_kanban_view .oe_kanban_group_title {
margin: 1px 1px 4px;
padding-left: 2px;
font-size: 100%;
margin-bottom: 4px;
font-size: 16px;
font-weight: bold;
color: #333333;
text-shadow: 0 1px 0 white;
}
.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_group_header {
vertical-align: top;
padding: 6px 7px 6px 6px;
padding: 6px 7px 0 6px;
}
.openerp .oe_kanban_view .oe_kanban_column.oe_kanban_grouped, .openerp .oe_kanban_view .oe_kanban_group_header {
background: #f0eeee;
@ -92,20 +108,19 @@
height: 16px;
background: url(/web_kanban/static/src/img/minus-icon.png) no-repeat;
}
.openerp .oe_kanban_view .oe_kanban_group_folded .oe_kanban_fold_icon {
background: url(/web_kanban/static/src/img/plus-icon.png) no-repeat;
}
.openerp .oe_kanban_view .oe_kanban_add {
.openerp .oe_kanban_view .oe_kanban_add, .openerp .oe_kanban_view .oe_kanban_header .oe_dropdown_toggle {
float: right;
margin-left: 4px;
cursor: pointer;
position: absolute;
top: 6px;
right: 6px;
width: 16px;
height: 16px;
background: url(/web_kanban/static/src/img/plus-icon.png) no-repeat;
position: relative;
top: -8px;
}
.openerp .oe_kanban_view .oe_kanban_quick_create {
overflow: hidden;
margin-bottom: 4px;
}
.openerp .oe_kanban_view .oe_kanban_quick_create_buttons {
margin: 4px 0;
}
.openerp .oe_kanban_view .oe_kanban_no_group .oe_kanban_quick_create {
width: 200px;
@ -113,12 +128,10 @@
}
.openerp .oe_kanban_view .oe_kanban_quick_create input {
display: block;
font-size: 13px;
box-sizing: border-box;
width: 100%;
}
.openerp .oe_kanban_view .oe_kanban_quick_create button {
float: right;
}
.openerp .oe_kanban_view .oe_kanban_vignette {
padding: 8px;
min-height: 100px;
@ -335,6 +348,9 @@
.openerp .oe_kanban_view .oe_kanban_card h3:hover {
text-decoration: none;
}
.openerp .oe_kanban_view .oe_kanban_card .oe_dropdown_kanban {
margin-top: 4px;
}
.openerp .oe_kanban_view .oe_kanban_star {
float: left;
position: inline-block;
@ -377,9 +393,8 @@
background-image: radial-gradient(#ee7777 0%, #cc3333 40%, #bb0808 100%);
}
.openerp .oe_kanban_view .oe_kanban_text_red {
background: #a61300;
color: white;
padding: 2px 4px;
color: #a61300;
font-weight: bold;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;

View File

@ -33,24 +33,36 @@
.oe_kanban_clear
clear: both
.oe_kanban_content
.oe_star_on, .oe_star_off
color: #ccc
text-shadow: 0 0 2px black
vertical-align: top
position: relative
top: -5px
&:hover
text-decoration: none
.oe_star_on
color: gold
div:first-child
margin-right: 12px
.oe_kanban_button_new
color: white
background: #DC5F59
// }}}
// KanbanGroups {{{
.oe_kanban_groups
height: inherit
width: 100%
.oe_kanban_group_title
margin: 1px 1px 4px
padding-left: 2px
font-size: 100%
margin-bottom: 4px
font-size: 16px
font-weight: bold
color: #333333
text-shadow: 0 1px 0 white
.oe_kanban_column, .oe_kanban_group_header
vertical-align: top
padding: 6px 7px 6px 6px
padding: 6px 7px 0 6px
.oe_kanban_column.oe_kanban_grouped, .oe_kanban_group_header
background: #f0eeee
@ -103,30 +115,32 @@
height: 16px
background: url(/web_kanban/static/src/img/minus-icon.png) no-repeat
.oe_kanban_group_folded .oe_kanban_fold_icon
background: url(/web_kanban/static/src/img/plus-icon.png) no-repeat
// }}}
// KanbanQuickCreate {{{
.oe_kanban_add
.oe_kanban_add, .oe_kanban_header .oe_dropdown_toggle
float: right
margin-left: 4px
cursor: pointer
position: absolute
top: 6px
right: 6px
width: 16px
height: 16px
background: url(/web_kanban/static/src/img/plus-icon.png) no-repeat
position: relative
top: -8px
//right: 6px
//width: 16px
//height: 16px
.oe_kanban_quick_create
// apply block formatting context
overflow: hidden
margin-bottom: 4px
.oe_kanban_quick_create_buttons
margin: 4px 0
.oe_kanban_no_group .oe_kanban_quick_create
width: 200px
padding: 10px
.oe_kanban_quick_create input
display: block
// margins within width
font-size: 13px
box-sizing: border-box
width: 100%
.oe_kanban_quick_create button
float: right
// }}}
// KanbanRecords {{{
.oe_kanban_vignette
@ -288,6 +302,8 @@
text-decoration: none
h3:hover
text-decoration: none
.oe_dropdown_kanban
margin-top: 4px
.oe_kanban_star
float: left
position: inline-block
@ -311,9 +327,8 @@
background: red
@include radial-gradient((#ee7777 0%, #cc3333 40%, #bb0808 100%))
.oe_kanban_text_red
background: #A61300
color: white
padding: 2px 4px
color: #A61300
font-weight: bold
@include radius(4px)
.oe_kanban_ellipsis
overflow: hidden

View File

@ -258,7 +258,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
scroll: false
});
} else {
this.$element.find('.oe_kanban_draghandle').removeClass('oe_kanban_draghandle');
this.$element.find('.oe_kanban_draghandle').removeClass('oe_kanban_draghandle').removeClass('oe_kanban_card');
}
},
on_record_moved : function(record, old_group, old_index, new_group, new_index) {
@ -592,7 +592,7 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
// If no draghandle is found, make the whole card as draghandle
if (!this.$element.find('.oe_kanban_draghandle').length) {
this.$element.children(':first').addClass('oe_kanban_draghandle');
this.$element.children(':first').addClass('oe_kanban_draghandle').addClass('oe_kanban_card');
}
this.$element.find('.oe_kanban_action').click(function() {

View File

@ -13,7 +13,7 @@
<div t-name="KanbanView.buttons" class="oe_kanban_buttons">
<t t-if="widget.options.action_buttons !== false">
<t t-if="widget._is_create_enabled()">
<button type="button" class="oe_button oe_kanban_button_new oe_form_button_hi">
<button type="button" class="oe_button oe_kanban_button_new oe_highlight oe_form_button_hi">
<t t-esc="widget.options.create_text || _t('Create')"/>
</button>
</t>
@ -23,9 +23,16 @@
<td class="oe_kanban_group_header">
<t t-if="widget.view.group_by">
<div class="oe_kanban_header">
<div class="oe_kanban_fold_icon"></div>
<div class="oe_dropdown_toggle">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li><a href="#">Fold</a></li>
<li><a href="#">Edit</a></li>
<li><a href="#">Delete</a></li>
</ul>
</div>
<t t-if="widget.view._is_quick_create_enabled()">
<div class="oe_kanban_add"></div>
<div class="oe_kanban_add oe_e">]</div>
</t>
<div class="oe_fold_column">
<div t-attf-class="oe_kanban_group_title #{widget.undefined_title ? 'oe_kanban_group_title_undefined' : ''}">