[FIX] web_kanban: t-att(f)-class for kanban buttons

The pre-processing of kanban qweb templates dropped the t-att(f)-class
of button and tags with a valid type attr (object, action, ...).
This commit is contained in:
qsm-odoo
2016-09-02 10:57:29 +01:00
parent 168b1e87c0
commit 2f8d1ec5e8
@@ -837,7 +837,15 @@ function transform_qweb_template (node, fvg, many2manys) {
} else {
node.attrs.type = 'button';
}
node.attrs['class'] = (node.attrs['class'] || '') + ' oe_kanban_action oe_kanban_action_' + node.tag;
var action_classes = " oe_kanban_action oe_kanban_action_" + node.tag;
if (node.attrs['t-attf-class']) {
node.attrs['t-attf-class'] += action_classes;
} else if (node.attrs['t-att-class']) {
node.attrs['t-att-class'] += " + '" + action_classes + "'";
} else {
node.attrs['class'] = (node.attrs['class'] || '') + action_classes;
}
}
break;
}