Commit 6a697550 by 王东红

Merge branch 'master' of http://47.99.244.21:9999/root/joshine

parents 292f02e7 252f1991
......@@ -155,7 +155,7 @@
.joshine-desction .desction-left{
width: 90%;
flot: left;
font-weight: bolder;
font-weight: inherit;
color: #000;
}
.joshine-desction .desction-right{
......@@ -170,7 +170,7 @@
font-size: small;
}
.joshine-desction #description{
max-height: 540px;
max-height: 300px;
overflow: auto;
}
</style>
......@@ -180,6 +180,11 @@ $short_description = $this->helper(Magento\Catalog\Helper\Output::class)->produc
$block->getProduct()->getShortDescription(),
'short_description'
);
$description = $this->helper(Magento\Catalog\Helper\Output::class)->productAttribute(
$block->getShortDescription(),
$block->getProduct()->getDescription(),
'description'
);
if ($short_description) :
?>
<div class="joshine-desction">
......@@ -191,9 +196,9 @@ if ($short_description) :
"multipleCollapsible": true
}}'>
<div data-role="collapsible">
<div data-role="trigger">
<a class="desction-left info-desc" href="#">Description</a>
<a class="desction-right info-desc" href="#">+</a>
<div data-role="trigger" class="short_description-button">
<a class="desction-left short_description info-desc" href="#">short_description</a>
<a class="desction-right short_description info-desc" href="#">+</a>
</div>
</div>
<div data-role="content" id="description">
......@@ -203,17 +208,52 @@ if ($short_description) :
</div>
</div>
</div>
<?php endif; ?>
<?php endif;
if ($description) :
?>
<div class="joshine-desction">
<div id="accordion" data-mage-init='{
"accordion":{
"active": [1, 2],
"collapsible": true,
"openedState": "active",
"multipleCollapsible": true
}}'>
<div data-role="collapsible">
<div data-role="trigger" class="description-button">
<a class="desction-left description info-desc" href="#">description</a>
<a class="desction-right description info-desc" href="#">+</a>
</div>
</div>
<div data-role="content" id="description">
<div class="desction-info">
<?php echo $description;?>
</div>
</div>
</div>
</div>
<?php endif;
?>
<script>
require([
'jquery'
], function ($) {
$(".info-desc").click(function () {
var number = $(".desction-right").html();
$(".short_description-button > a").click(function () {
var number = $(".desction-right.short_description.info-desc").html();
if (number == "+"){
$(".desction-right.short_description.info-desc").html("-");
}else{
$(".desction-right.short_description.info-desc").html("+");
}
})
$(".description-button > a").click(function () {
var number = $(".desction-right.description.info-desc").html();
if (number == "+"){
$(".desction-right").html("-");
$(".desction-right.description.info-desc").html("-");
}else{
$(".desction-right").html("+");
$(".desction-right.description.info-desc").html("+");
}
})
setTimeout(function(){
......
......@@ -62,11 +62,11 @@
], function ($) {
$("#wishlist").html($(".product-addto-links > div:first").html());
setTimeout(function(){
if ($("div").hasClass("swatch-attribute size")){
var size = '<div id="product-intro__freeshipping-more-3" data-trigger="trigger">\n' +
' <a href="javascript:void(0);">Size Guide</a></span></div>';
$(".swatch-attribute.size > span:last").after(size);
}
// if ($("div").hasClass("swatch-attribute size")){
// var size = '<div id="product-intro__freeshipping-more-3" data-trigger="trigger">\n' +
// ' <a href="javascript:void(0);">Size Guide</a></span></div>';
// $(".swatch-attribute.size > span:last").after(size);
// }
},3000);
});
</script>
......@@ -79,17 +79,18 @@
'responsive': true,
'buttons' : []
}}">
<div class="content" id="product-intro-size-chart"><?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-size-chart')->toHtml();?></div>
<div class="content" id="product-intro-size-chart" style="display:none;">
<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('product-intro-size-chart')->toHtml();?>
</div>
</div>
<style>
#product-intro__freeshipping-more-3{
display: inline-block;
color: #000;
color: #2d68a;
font-size: 12px;
line-height: 1;
margin-top: -10px;
font-weight: 700;
margin-top: -15px;
margin-left: 60%;
width: 50%;
float: right;
......@@ -136,5 +137,8 @@
}, 10000);
event.stopPropagation();
});
setTimeout(function() {
$("#product-intro-size-chart").show();
}, 3000);
});
</script>
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