ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
& when (@media-common = true) {
|
||||
.product-item{
|
||||
.product-grid__image-wrapper {
|
||||
.ox-grid-gallery-video{
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
z-index: 2;
|
||||
}
|
||||
.ox-product-hover-image-container{
|
||||
.product-image-photo {
|
||||
.lib-css(transition, .3s, @_prefix: 1);
|
||||
.lib-css(transition-property, ~"opacity, visibility", @_prefix: 1);
|
||||
}
|
||||
.product-first-image-photo {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
z-index: 1;
|
||||
&.owl-lazy{
|
||||
opacity:0;
|
||||
}
|
||||
}
|
||||
.product-second-image-photo{
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:not(:hover){
|
||||
.product-grid__image-wrapper {
|
||||
.ox-product-hover-image-container{
|
||||
.product-second-image-photo{
|
||||
opacity: 0!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.product-grid__image-wrapper {
|
||||
.ox-grid-gallery-video{
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
.ox-product-hover-image-container{
|
||||
.product-first-image-photo {
|
||||
opacity: 0!important;
|
||||
visibility: hidden;
|
||||
}
|
||||
.product-second-image-photo{
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
define([
|
||||
'jquery'
|
||||
], function ($) {
|
||||
'use strict';
|
||||
|
||||
return function (widget) {
|
||||
$.widget('amasty_conf.SwatchRenderer', widget, {
|
||||
_AmOnClick: function ($this, $widget) {
|
||||
$widget._OnClick($this, $widget);
|
||||
var slickSlide = $this,
|
||||
possibleSlide = $this.parent();
|
||||
// fix for when price in title enabled
|
||||
if (possibleSlide.hasClass('slick-slide')) {
|
||||
slickSlide = possibleSlide;
|
||||
}
|
||||
if (slickSlide.hasClass('slick-slide') && $this.hasClass('selected')) {
|
||||
slickSlide.parent()
|
||||
.find('[option-id="' + $this.attr('option-id') + '"]:not(.selected)')
|
||||
.addClass('selected');
|
||||
}
|
||||
|
||||
if (this.amasty_conf_config && this.amasty_conf_config.share.enable == '1') {
|
||||
$widget._addHashToUrl($this, $widget);
|
||||
}
|
||||
|
||||
$widget._reloadProductInformation($this, $widget);
|
||||
|
||||
var isProductViewExist = $('body.catalog-product-view').length > 0;
|
||||
|
||||
if (isProductViewExist) {
|
||||
$widget._RenderPricesForControls();
|
||||
}
|
||||
if (isProductViewExist || this.ajaxCart) {
|
||||
this._saveLastRowContent();
|
||||
$widget._RenderProductMatrix();
|
||||
if (this.options.jsonConfig.swatches_slider) {
|
||||
this._generateSliderSwatches();
|
||||
}
|
||||
}
|
||||
$widget._addOutOfStockLabels();
|
||||
},
|
||||
onMouseLeave: function($this, $widget) {
|
||||
var $parent = $this.parents('.' + $widget.options.classes.attributeClass),
|
||||
selectedOption = $parent.find('.' + $widget.options.classes.optionClass + '.selected'),
|
||||
$label = $parent.find('.' + $widget.options.classes.attributeSelectedOptionLabelClass),
|
||||
$input = $parent.find('.' + $widget.options.classes.attributeInput),
|
||||
attributeId = $this.attr('attribute-id')
|
||||
|| $this.attr('data-attribute-id')
|
||||
|| selectedOption.attr('attribute-id')
|
||||
|| selectedOption.attr('data-attribute-id'),
|
||||
selectedOptionAttributeClass = $widget.options.jsonConfig.selected_option_attribute_class || 'option-selected';
|
||||
if ($widget.inProductList) {
|
||||
$input = $widget.productForm.find(
|
||||
'.' + $widget.options.classes.attributeInput + '[name="super_attribute[' + attributeId + ']"]'
|
||||
);
|
||||
}
|
||||
if (selectedOption.length > 0) {
|
||||
$parent.attr(selectedOptionAttributeClass, selectedOption.attr('option-id'));
|
||||
} else {
|
||||
$parent.removeAttr(selectedOptionAttributeClass).find('.selected').removeClass('selected');
|
||||
$input.val('');
|
||||
$label.text('');
|
||||
$this.attr('aria-checked', false);
|
||||
}
|
||||
$widget._loadMedia();
|
||||
},
|
||||
});
|
||||
|
||||
return $.amasty_conf.SwatchRenderer;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user