summaryrefslogtreecommitdiff
path: root/addons
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
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')
-rw-r--r--addons/web/static/src/css/base.css6
-rw-r--r--addons/web/static/src/css/base.sass10
-rw-r--r--addons/web/static/src/js/view_form.js20
3 files changed, 29 insertions, 7 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 30fe4d415cf..94d02758ad0 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -25,7 +25,6 @@
display: none !important;
}
}
-
.openerp.openerp_webclient_container {
height: 100%;
}
@@ -2566,7 +2565,7 @@
background-color: #eeeeee;
}
.openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {
- padding: 4px 6px 3px 6px;
+ padding: 4px 6px 3px;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_edition .oe_list_field_cell:not(.oe_readonly) {
color: transparent;
@@ -2647,6 +2646,9 @@
margin: 0 !important;
padding: 0;
}
+.openerp .oe_list .oe_form .oe_form_field_boolean {
+ padding: 1px 6px 3px;
+}
.openerp .oe_list .oe_list_content .oe_group_header {
background-color: #fcfcfc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index e388ad16727..f911929e159 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -2030,10 +2030,8 @@ $sheet-padding: 16px
background-color: #eee
$row-height: 27px
- .oe_list_editable
- .oe_list_content
- td.oe_list_field_cell
- padding: 4px 6px 3px 6px
+ .oe_list_editable .oe_list_content td.oe_list_field_cell
+ padding: 4px 6px 3px
.oe_list.oe_list_editable.oe_editing
.oe_edition .oe_list_field_cell:not(.oe_readonly)
*
@@ -2106,6 +2104,10 @@ $sheet-padding: 16px
position: absolute
margin: 0 !important // dammit
padding: 0
+ .oe_form_field_boolean
+ // use padding similar to actual cell to correctly position the
+ // checkbox
+ padding: 1px 6px 3px
.oe_list_content .oe_group_header
@include vertical-gradient(#fcfcfc, #dedede)
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);
+ }
});
/*