[IMP] fixed kanban background
bzr revid: fp@openerp.com-20120804164542-1a5h9xj37bidkyi4
This commit is contained in:
parent
deeb7a7049
commit
b4beb9ccdf
|
@ -1,8 +1,10 @@
|
|||
@charset "utf-8";
|
||||
.openerp .oe_kanban_view {
|
||||
background: url(/web/static/src/img/form_sheetbg.png);
|
||||
height: inherit;
|
||||
}
|
||||
.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_dummy_cell {
|
||||
background: url(/web/static/src/img/form_sheetbg.png);
|
||||
}
|
||||
.openerp .oe_kanban_view .ui-sortable-placeholder {
|
||||
border: 1px dotted black;
|
||||
visibility: visible !important;
|
||||
|
@ -72,8 +74,9 @@
|
|||
background: #f0eeee;
|
||||
border-left: 1px solid #f0f8f8;
|
||||
border-right: 1px solid #b9b9b9;
|
||||
min-width: 170px;
|
||||
max-width: 250px;
|
||||
}
|
||||
.openerp .oe_kanban_view.oe_kanban_grouped .oe_kanban_group_header {
|
||||
width: 1%;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_form .oe_kanban_column {
|
||||
padding: 0px;
|
||||
|
@ -331,7 +334,6 @@
|
|||
.openerp .oe_kanban_view .oe_kanban_card {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: 50px;
|
||||
background: white;
|
||||
border: 1px solid #d8d8d8;
|
||||
border-bottom-color: #b9b9b9;
|
||||
|
|
|
@ -31,8 +31,9 @@
|
|||
.openerp .oe_kanban_view
|
||||
// KanbanView {{{
|
||||
//background: url(data:image/pngbase64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAKElEQVQIHWP8DwTv379nAAFBQUEGhnfv3oHEwADEZgJLIRGMIClkLQCr3x2Htp/lLwAAAABJRU5ErkJggg==)
|
||||
background: url(/web/static/src/img/form_sheetbg.png)
|
||||
height: inherit
|
||||
&.oe_kanban_grouped .oe_kanban_dummy_cell
|
||||
background: url(/web/static/src/img/form_sheetbg.png)
|
||||
.ui-sortable-placeholder
|
||||
border: 1px dotted black
|
||||
visibility: visible !important
|
||||
|
@ -92,8 +93,9 @@
|
|||
background: #f0eeee
|
||||
border-left: 1px solid #f0f8f8
|
||||
border-right: 1px solid #b9b9b9
|
||||
min-width: 170px
|
||||
max-width: 250px
|
||||
&.oe_kanban_grouped
|
||||
.oe_kanban_group_header
|
||||
width: 1%
|
||||
|
||||
.oe_form
|
||||
.oe_kanban_column
|
||||
|
@ -297,7 +299,6 @@
|
|||
.oe_kanban_card
|
||||
position: relative
|
||||
display: block
|
||||
min-height: 50px
|
||||
background: white
|
||||
border: 1px solid #d8d8d8
|
||||
border-bottom-color: #b9b9b9
|
||||
|
|
|
@ -219,7 +219,6 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
group.destroy();
|
||||
});
|
||||
this.groups = [];
|
||||
this.$element.find('.oe_kanban_groups_headers, .oe_kanban_groups_records').empty();
|
||||
},
|
||||
do_add_groups: function(groups) {
|
||||
var self = this;
|
||||
|
@ -227,7 +226,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
self.groups[group.undefined_title ? 'unshift' : 'push'](group);
|
||||
});
|
||||
var groups_started = _.map(this.groups, function(group) {
|
||||
return group.appendTo(self.$element.find('.oe_kanban_groups_headers'));
|
||||
return group.prependTo(self.$element.find('.oe_kanban_groups_headers'));
|
||||
});
|
||||
return $.when.apply(null, groups_started).then(function () {
|
||||
self.on_groups_started();
|
||||
|
@ -294,11 +293,13 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
|||
_.each(this.groups, function(group) {
|
||||
if (!group.state.folded) {
|
||||
if (182*unfolded>=self.$element.width()) {
|
||||
group.$element.css('width', "170px");
|
||||
group.$element.children(':first').css('width', "170px");
|
||||
} else if (262*unfolded<self.$element.width()) {
|
||||
group.$element.css('width', "250px");
|
||||
group.$element.children(':first').css('width', "250px");
|
||||
} else {
|
||||
group.$element.css('width', Math.floor(self.$element.width()/unfolded) + 'px');
|
||||
// -12 because of padding 6 between cards
|
||||
// -1 because of the border of the latest dummy column
|
||||
group.$element.children(':first').css('width', Math.floor((self.$element.width()-1)/unfolded)-12 + 'px');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -399,7 +400,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
|
|||
self.quick.replace($(".oe_kanban_no_group_qc_placeholder"));
|
||||
}
|
||||
this.$records = $(QWeb.render('KanbanView.group_records_container', { widget : this}));
|
||||
this.$records.appendTo(this.view.$element.find('.oe_kanban_groups_records'));
|
||||
this.$records.prependTo(this.view.$element.find('.oe_kanban_groups_records'));
|
||||
this.$element.find(".oe_kanban_fold_icon").click(function() {
|
||||
self.do_toggle_fold();
|
||||
self.view.compute_groups_width();
|
||||
|
|
|
@ -4,8 +4,10 @@
|
|||
<div class="oe_kanban_buttons"/>
|
||||
<table class="oe_kanban_groups">
|
||||
<tr class="oe_kanban_groups_headers">
|
||||
<td class="oe_kanban_dummy_cell"><div/></td>
|
||||
</tr>
|
||||
<tr class="oe_kanban_groups_records">
|
||||
<td class="oe_kanban_dummy_cell"><div/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue