summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-01-05 15:48:23 +0100
committerqsm-odoo <qsm@odoo.com>2016-09-02 10:57:29 +0100
commit2f8d1ec5e88e2ea50ad69efa75bbfa7bcc3e7ba1 (patch)
tree84d07a0f242b136002bfe8671441de30af55c414
parent168b1e87c0f9af1d54604c0bd3b1c2b385a208e5 (diff)
[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, ...).
-rw-r--r--addons/web_kanban/static/src/js/kanban_view.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/web_kanban/static/src/js/kanban_view.js b/addons/web_kanban/static/src/js/kanban_view.js
index 7173ffa7f1e..e416e50fd1d 100644
--- a/addons/web_kanban/static/src/js/kanban_view.js
+++ b/addons/web_kanban/static/src/js/kanban_view.js
@@ -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;
}