summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-11-07 14:21:52 +0100
committerXavier Morel <xmo@openerp.com>2012-11-07 14:21:52 +0100
commitbfad5ad032e68b4e753249ff14523d5156ce8cef (patch)
tree9dcf865305200bebea2a7619bc34ea9ff6d28e94 /addons/web/static/src/js
parent8b18d999bdf3f0aa8ae5be88a9b6df0b79472d12 (diff)
[ADD] custom dimensioning of a bunch of form widget for better editable listview compat/styling
bzr revid: xmo@openerp.com-20121107132152-9s6s1n4fn4bwjdm2
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/view_form.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index a3b9f5fae7d..07850d0ecaa 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -2216,6 +2216,13 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
},
focus: function() {
this.$('input:first').focus();
+ },
+ set_dimensions: function (height, width) {
+ this._super(height, width);
+ this.$('input').css({
+ height: height,
+ width: width
+ });
}
});
@@ -2502,7 +2509,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
this.$textarea.focus();
},
set_dimensions: function (height, width) {
- this._super();
+ this._super(height, width);
this.$textarea.css({
width: width,
minHeight: height
@@ -2664,6 +2671,13 @@ instance.web.form.FieldSelection = instance.web.form.AbstractField.extend(instan
},
focus: function() {
this.$el.find('select:first').focus();
+ },
+ set_dimensions: function (height, width) {
+ this._super(height, width);
+ this.$('select').css({
+ height: height,
+ width: width
+ });
}
});
@@ -3146,6 +3160,10 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this.ed_def.reject();
return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments);
},
+ set_dimensions: function (height, width) {
+ this._super(height, width);
+ this.$input.css('height', height);
+ }
});
/*