Skip to content
Permalink
Browse files

[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.
  • Loading branch information...
awa-odoo committed Mar 12, 2019
1 parent 13da67b commit 098fb1bd5016ecaf345d3297c89daaadf4b3426a
@@ -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 {

0 comments on commit 098fb1b

Please sign in to comment.
You can’t perform that action at this time.