Authored by 周少峰

Merge branch 'master' into feature/seoUrl

... ... @@ -2,7 +2,7 @@
{{#each list}}
<li>
<a class="item item-{{@index}}" href="{{url}}" target= "_blank">
<img class="lazy" data-original="{{image2 img w=235 h=315}}"/>
<img class="lazy" data-original="{{image2 img w=280 h=375 q=80}}"/>
<div class="info">
<p class="title">{{title}}</p>
<p class="price">{{price}}</p>
... ...
{
"name": "yohobuy-node",
"version": "5.4.3",
"version": "5.4.5",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ... @@ -109,7 +109,7 @@
"yoho-handlebars": "^4.0.5",
"yoho-jquery": "^1.12.4",
"yoho-jquery-dotdotdot": "0.0.1",
"yoho-jquery-lazyload": "^1.9.7",
"yoho-jquery-lazyload": "1.9.7",
"yoho-jquery-pjax": "0.0.1",
"yoho-jquery-placeholder": "^2.3.1",
"yoho-jquery-qrcode": "^0.14.0",
... ...
... ... @@ -437,6 +437,26 @@ $seniorAttrWrap.on('mouseenter', '.attr', function() {
// 【高级选项】多选
$('.senior-sub').on('click', '.multi-select', function() {
$(this).closest('.senior-sub').addClass('multi');
}).on('click', '.check-container .attr', function() {
var $this = $(this),
$check = $this.find('.checkbox'),
$btnOk = $this.closest('.senior-content').find('.multi-select-ok');
$check.toggleClass('checked');
if ($check.hasClass('checked')) {
$check.html(checkUnicode.checked);
} else {
$check.html(checkUnicode.unchecked);
}
// 更新按钮状态
if ($check.hasClass('checked') ||
$this.siblings('.attr').find('.checked').length > 0) {
$btnOk.removeClass('dis');
} else {
$btnOk.addClass('dis');
}
}).on('click', '.multi-select-ok', function() {
var $btn2 = $(this),
$sub = $btn2.closest('.senior-sub'),
... ... @@ -451,6 +471,14 @@ $('.senior-sub').on('click', '.multi-select', function() {
});
uriLoc($sub.data('attr'), val.join(','));
}).on('click', '.multi-select-cancel', function() {
var $panel = $(this).closest('.multi');
$panel.removeClass('multi');
clearChecked($panel.find('.checkbox.checked'), $panel.find('.attr.checked')); // 清除选中状态
// 确定按钮状态恢复dis
$(this).siblings('.multi-select-ok').addClass('dis');
}).on('mouseenter', function() {
clearTimeout(seniorHoverTime);
}).on('mouseleave', function() {
... ...
... ... @@ -382,8 +382,14 @@
max-width: 950px;
}
&.multi .multi-select {
display: none;
&.multi {
.multi-select {
display: none;
}
.attr.checked a {
color: #666;
}
}
.multi-select {
... ...