[IMP] (w_)sale_product_configurator: improve single custom value layout
Purpose ======= When a single custom value is configured in an attribute, use the 'value' label as a placeholder to have a full width input.
This commit is contained in:
@@ -100,7 +100,6 @@ var VariantMixin = {
|
||||
|| $variantContainer
|
||||
.find('.variant_custom_value')
|
||||
.data('attribute_value_id') !== parseInt(attributeValueId)){
|
||||
$variantContainer.find('.variant_custom_value_label').remove();
|
||||
$variantContainer.find('.variant_custom_value').remove();
|
||||
|
||||
var $input = $('<input>', {
|
||||
@@ -117,16 +116,12 @@ var VariantMixin = {
|
||||
$input.addClass('custom_value_radio');
|
||||
$target.closest('div').after($input);
|
||||
} else {
|
||||
var $label = $('<label>', {
|
||||
html: attributeValueName + ': ',
|
||||
class: 'variant_custom_value_label'
|
||||
});
|
||||
$input.attr('placeholder', attributeValueName);
|
||||
$input.addClass('custom_value_own_line');
|
||||
$variantContainer.append($label).append($input);
|
||||
$variantContainer.append($input);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$variantContainer.find('.variant_custom_value_label').remove();
|
||||
$variantContainer.find('.variant_custom_value').remove();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,9 +93,7 @@ label.css_attribute_color.css_not_available {
|
||||
margin-bottom: 0.7rem;
|
||||
|
||||
&.custom_value_own_line {
|
||||
width: 60%;
|
||||
display: inline-block;
|
||||
margin-left: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,11 +104,6 @@ label.css_attribute_color.css_not_available {
|
||||
select {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.variant_custom_value_label {
|
||||
margin: 0.3rem 0rem;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.o_product_configurator {
|
||||
|
||||
Reference in New Issue
Block a user