[FIX] remove min-width on number form fields when inside an editable list view
otherwise it refused to fit in small cells also remove !important specifications which are just a bloody fucking pain every single time, they're just a shit hack over doing things correctly in the first place, to hell with these things. lp bug: https://launchpad.net/bugs/1046180 fixed bzr revid: xmo@openerp.com-20121113123047-jspflyhfb8gei24r
This commit is contained in:
parent
209ad67cf4
commit
f908f44759
|
@ -2306,16 +2306,16 @@
|
|||
text-align: justify;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_form .oe_form_field_integer input {
|
||||
width: 6em !important;
|
||||
width: 6em;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_form .oe_form_field_float input {
|
||||
width: 7em !important;
|
||||
width: 7em;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_form .oe_form_field_date input {
|
||||
width: 7.5em !important;
|
||||
width: 7.5em;
|
||||
}
|
||||
.openerp .oe_form_editable .oe_form .oe_form_field_datetime input {
|
||||
width: 11.5em !important;
|
||||
width: 11.5em;
|
||||
}
|
||||
.openerp .oe_hidden_input_file {
|
||||
position: relative;
|
||||
|
@ -2580,30 +2580,26 @@
|
|||
.openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_cm_button {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
|
||||
height: 27px;
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field {
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
|
||||
height: 27px;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
border: 1px solid #aaaaff;
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer input {
|
||||
text-align: right;
|
||||
width: 100% !important;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime > span, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date > span {
|
||||
width: 100% !important;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime input.oe_datepicker_master, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date input.oe_datepicker_master {
|
||||
width: 100% !important;
|
||||
}
|
||||
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field .oe_form_field_float, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field .oe_form_view_integer, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date {
|
||||
min-width: 0 !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
.openerp .oe_list_group_name {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
@ -1837,13 +1837,13 @@ $sheet-padding: 16px
|
|||
.oe_form_editable
|
||||
.oe_form
|
||||
.oe_form_field_integer input
|
||||
width: 6em !important
|
||||
width: 6em
|
||||
.oe_form_field_float input
|
||||
width: 7em !important
|
||||
width: 7em
|
||||
.oe_form_field_date input
|
||||
width: 7.5em !important
|
||||
width: 7.5em
|
||||
.oe_form_field_datetime input
|
||||
width: 11.5em !important
|
||||
width: 11.5em
|
||||
// }}}
|
||||
// FormView.fields_binary {{{
|
||||
/* http://www.quirksmode.org/dom/inputfile.html
|
||||
|
@ -2043,24 +2043,21 @@ $sheet-padding: 16px
|
|||
.oe_m2o_cm_button
|
||||
display: none
|
||||
.oe_form_field
|
||||
min-width: 0
|
||||
max-width: none
|
||||
input, textarea
|
||||
height: $row-height
|
||||
input, textarea
|
||||
@include radius(0)
|
||||
border: 1px solid #aaf
|
||||
margin: 0
|
||||
min-width: 0
|
||||
&.oe_form_field_float,&.oe_form_view_integer
|
||||
input
|
||||
text-align: right
|
||||
width: 100% !important
|
||||
&.oe_form_field_datetime,&.oe_form_field_date
|
||||
> span
|
||||
width: 100% !important
|
||||
input.oe_datepicker_master
|
||||
width: 100% !important
|
||||
.oe_form_field_float,.oe_form_view_integer,&.oe_form_field_datetime,&.oe_form_field_date
|
||||
min-width: 0 !important
|
||||
max-width: none !important
|
||||
.oe_list_group_name
|
||||
white-space: nowrap
|
||||
// }}}
|
||||
|
|
|
@ -2152,17 +2152,10 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
|
|||
},
|
||||
|
||||
set_dimensions: function (height, width) {
|
||||
// remove width css property
|
||||
this.$el.css('width', '');
|
||||
// extract style (without width)
|
||||
var old_style = this.$el.attr('style');
|
||||
// jQuery doesn't understand/use !important
|
||||
var style = 'width:' + width + 'px !important;';
|
||||
if (old_style) {
|
||||
style += old_style
|
||||
}
|
||||
this.$el.attr('style', style);
|
||||
this.$el.css('minHeight', height);
|
||||
this.$el.css({
|
||||
width: width,
|
||||
minHeight: height
|
||||
});
|
||||
},
|
||||
commit_value: function() {
|
||||
return $.when();
|
||||
|
|
Loading…
Reference in New Issue