[FIX] Compute min-height for kanban view's cards in ungroupped mode in order to avoid gaps

bzr revid: fme@openerp.com-20120509162116-3f5bp2n720kvmsof
This commit is contained in:
Fabien Meghazi
2012-05-09 18:21:16 +02:00
parent e421c147f9
commit fa67e8f0c3
+11
View File
@@ -355,8 +355,19 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
this.$element.data('widget', this);
this.$records.data('widget', this);
this.$has_been_started.resolve();
this.compute_cards_height();
return def;
},
compute_cards_height: function() {
var self = this;
var min_height = 0;
_.each(this.records, function(r) {
min_height = Math.max(min_height, r.$element.outerHeight());
});
_.each(this.records, function(r) {
r.$element.css('min-height', min_height);
});
},
destroy: function() {
this._super();
if (this.$records) {