summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2014-03-19 09:57:18 +0100
committerGery Debongnie <ged@openerp.com>2014-03-19 09:57:18 +0100
commitf4cfed3f0e89f8841b16ad578dd2c360f01d18ec (patch)
tree1cd2297049ee1b3b07c2db0b9930faced48de0aa /addons/web/static/src/js
parent373cb908caf5792367e49050e3d4ae086a097d0c (diff)
[IMP] improves the look of the stat buttons in form view: the statinfo widget displays the information on two lines, the padding/margin/width have been adjusted. (addon web)
bzr revid: ged@openerp.com-20140319085718-9v1l3pb43ee6qws6
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/view_form.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 969e0150737..5840d718bf8 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -1917,7 +1917,7 @@ instance.web.form.WidgetButton = instance.web.form.FormWidget.extend({
init: function(field_manager, node) {
node.attrs.type = node.attrs['data-button-type'];
this.is_stat_button = /\boe_stat_button\b/.test(node.attrs['class']);
- this.icon = node.attrs.icon && "<span class=\"fa " + node.attrs.icon + "\"></span>";
+ this.icon = node.attrs.icon && "<span class=\"fa " + node.attrs.icon + " fa-fw\"></span>";
this._super(field_manager, node);
this.force_disabled = false;
this.string = (this.node.attrs.string || '').replace(/_/g, '');
@@ -5918,8 +5918,11 @@ instance.web.form.StatInfo = instance.web.form.AbstractField.extend({
this.set("value", 0);
},
render_value: function() {
- var text = _.str.sprintf("%d %s", this.get("value") || 0, this.string);
- this.$el.html(QWeb.render("StatInfo", {text: text}));
+ var options = {
+ value: this.get("value") || 0,
+ text: this.string,
+ };
+ this.$el.html(QWeb.render("StatInfo", options));
},
});