Commit 71ca1090 by 王东红

fix

parent 2805e6b6
......@@ -97,7 +97,7 @@
<image id="swatch_image" type="swatch_image">
<width>40</width>
<height>50</height>
<height>40</height>
</image>
<!-- These lists use category_page_grid fallback. Not need to declare srcset for them -->
......
......@@ -1657,10 +1657,10 @@ button.action.submit.primary {
}
}
.swatch-option.color, .swatch-option.text, .swatch-option.image{
width: 40px !important;
height: 40px !important;
}
//.swatch-option.color, .swatch-option.text, .swatch-option.image{
// width: 40px !important;
// height: 40px !important;
//}
//色块强制大小
#product-options-wrapper .swatch-option.image{
......
......@@ -306,8 +306,8 @@
isInProductView = false;
productId = this.element.parents('.product-item-info')
.find('.price-box.price-final_price')
.attr('data-product-id');
.find('.price-box.price-final_price')
.attr('data-product-id');
if (!productId) {
// Check individual product.
......@@ -368,16 +368,16 @@
// Create new control
container.append(
'<div class="' + classes.attributeClass + ' ' + item.code + '" ' +
'data-attribute-code="' + item.code + '" ' +
'data-attribute-id="' + item.id + '">' +
label +
'<div aria-activedescendant="" ' +
'aria-invalid="false" ' +
'aria-required="true" ' +
'role="listbox" ' + listLabel +
'class="' + classes.attributeOptionsWrapper + ' clearfix">' +
options + select +
'</div>' + input +
'data-attribute-code="' + item.code + '" ' +
'data-attribute-id="' + item.id + '">' +
label +
'<div aria-activedescendant="" ' +
'aria-invalid="false" ' +
'aria-required="true" ' +
'role="listbox" ' + listLabel +
'class="' + classes.attributeOptionsWrapper + ' clearfix">' +
options + select +
'</div>' + input +
'</div>'
);
......@@ -509,7 +509,8 @@
} else if (type === 2) {
// Image
html += '<div class="' + optionClass + ' image" ' + attr +
' style="background: url(' + value + ') no-repeat center; background-size: initial;' + '">' + '' +
' style="background: url(' + value + ') no-repeat center; background-size: initial;width:' +
swatchImageWidth + 'px; height:' + swatchImageHeight + 'px">' + '' +
'</div>';
} else if (type === 3) {
// Clear
......@@ -624,8 +625,8 @@
*/
_loadMedia: function () {
var $main = this.inProductList ?
this.element.parents('.product-item-info') :
this.element.parents('.column.main'),
this.element.parents('.product-item-info') :
this.element.parents('.column.main'),
images;
if (this.options.useAjax) {
......@@ -749,7 +750,7 @@
*/
_toggleCheckedAttributes: function ($this, $wrapper) {
$wrapper.attr('aria-activedescendant', $this.attr('id'))
.find('.' + this.options.classes.optionClass).attr('aria-checked', false);
.find('.' + this.options.classes.optionClass).attr('aria-checked', false);
$this.attr('aria-checked', true);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment