[IMP] kanban :- if drag any record and no record in this group then empty group display and again drop any record in empty group.

bzr revid: ysa@tinyerp.com-20110921095245-e2hucliw1zo5uzbj
This commit is contained in:
Yogesh (OpenERP) 2011-09-21 15:22:45 +05:30
parent e83ec892eb
commit 9936f72760
3 changed files with 4 additions and 10 deletions

View File

@ -1,5 +1,4 @@
.openerp .oe_kanban_view .oe_column {
float: left;
width: 100%;
}

View File

@ -173,7 +173,7 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
},
do_fold_unfold_columns: function(event, element_id) {
var column_id = "column_" + element_id;
var column_element = this.$element.find("#" + column_id + ".oe_fold_column");
var column_element = this.$element.find("#" + column_id + " .oe_fold_column");
if (column_element.is(":hidden")) {
this.$element.find("#" + column_id).find("img.fold-columns-icon").attr('src', '/web_kanban/static/src/img/minus-icon.png');
column_element.show();
@ -399,9 +399,6 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
kanban_gravatar: self.kanban_gravatar
}));
});
} else {
self.$element.find("#column_" + data.value).remove();
self.all_display_data.splice(index, 1);
}
});
this.$element.find('.oe_kanban_action').click(this.on_action_clicked);

View File

@ -11,7 +11,7 @@
<tr>
<td t-foreach="data" t-as="columns" class="oe_table_column oe_column_heading" t-att-id="'column_' + columns.value">
<img t-att-id="columns.value" class="fold-columns-icon" src="/web_kanban/static/src/img/minus-icon.png"/>
<div t-att-id="'column_' + columns.value" class="oe_fold_column">
<div class="oe_fold_column" t-att-id="'column_' + columns.value">
<t t-if="columns.value" t-esc="columns.header"/>
<t t-if="columns.aggregates">
<br/><t t-esc="columns.aggregates"/>
@ -20,11 +20,9 @@
</td>
</tr>
<tr>
<td t-foreach="data" t-as="columns" class="oe_table_column oe_column_data" t-att-id="'column_' + columns.value" t-attf-style="width: #{Math.round(99 / data.length)}%">
<td t-foreach="data" t-as="columns" class="oe_column oe_table_column" t-att-id="'column_' + columns.value" t-attf-style="width: #{Math.round(99 / data.length)}%">
<p class="oe_vertical_text" t-att-id="'column_' + columns.value"> <t t-esc="columns.header"/></p>
<div class="oe_column oe_fold_column" t-att-id="'column_' + columns.value">
<div t-foreach="columns.records" t-as="record" class="oe_kanban_record" t-att-id="'main_' + record.id"/>
</div>
<div t-foreach="columns.records" t-as="record" class="oe_fold_column oe_kanban_record" t-att-id="'main_' + record.id"/>
</td>
</tr>
</table>