|
|
@@ -76,10 +76,10 @@
|
|
|
</ul>
|
|
|
<div class="form_field">
|
|
|
<div>
|
|
|
- <input id="price" type="checkbox" ><label for="price"> <span>남여 공용만 보기</span> </label>
|
|
|
+ <input id="sexGb" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="sexGb"> <span>남여 공용만 보기</span> </label>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <input id="chk-2" type="checkbox" checked=""><label for="chk-2"> <span>신상품만 보기</span> </label>
|
|
|
+ <input id="newProd" type="checkbox" onclick="fnFilterOption(this,'on');"><label for="newProd"> <span>신상품만 보기</span> </label>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -113,7 +113,7 @@
|
|
|
<strong>하의</strong>
|
|
|
<th:block th:each="filterSizeData, filterSizeStat : ${filterSizeList}" th:if="${filterSizeData.filterCd == 'B'}">
|
|
|
<label class="size_btn">
|
|
|
- <input type="checkbox" group="filterValue" th:id="${'chkFilterBSize'+filterSizeStat.count}" name="size2" th:vale="${filterSizeData.filterNm}" th:data-id="${filterSizeData.filterNm}" onclick="filterSel(this,'size','off','2');"><span th:text="${filterSizeData.filterNm}">80</span>
|
|
|
+ <input type="checkbox" group="filterValue" th:id="${'chkFilterBSize'+filterSizeStat.count}" name="size" th:vale="${filterSizeData.filterNm}" th:data-id="${filterSizeData.filterNm}" onclick="filterSel(this,'size','off','2');"><span th:text="${filterSizeData.filterNm}">80</span>
|
|
|
</label>
|
|
|
</th:block>
|
|
|
</li>
|
|
|
@@ -121,7 +121,7 @@
|
|
|
<strong>신발</strong>
|
|
|
<th:block th:each="filterSizeData, filterSizeStat : ${filterSizeList}" th:if="${filterSizeData.filterCd == 'S'}">
|
|
|
<label class="size_btn">
|
|
|
- <input type="checkbox" group="filterValue" th:id="${'chkFilterSSize'+filterSizeStat.count}" name="size3" th:vale="${filterSizeData.filterNm}" th:data-id="${filterSizeData.filterNm}" onclick="filterSel(this,'size','off','3');"><span th:text="${filterSizeData.filterNm}">80</span>
|
|
|
+ <input type="checkbox" group="filterValue" th:id="${'chkFilterSSize'+filterSizeStat.count}" name="size" th:vale="${filterSizeData.filterNm}" th:data-id="${filterSizeData.filterNm}" onclick="filterSel(this,'size','off','3');"><span th:text="${filterSizeData.filterNm}">80</span>
|
|
|
</label>
|
|
|
</th:block>
|
|
|
</li>
|
|
|
@@ -132,7 +132,9 @@
|
|
|
<!-- 가격 -->
|
|
|
<div class="sort tap04" id="priceFilterDiv">
|
|
|
<div class="range">
|
|
|
- <input type="text" class="js-range-slider01" name="my_range01" value="" />
|
|
|
+ <input type="text" class="js-range-slider01" name="" value="" />
|
|
|
+ <input type="hidden" id="price_input_from" value="0"/>
|
|
|
+ <input type="hidden" id="price_input_to" value="0"/>
|
|
|
</div>
|
|
|
<a href="javascript:void(0)" class="tap_close">delete-btn</a>
|
|
|
</div>
|
|
|
@@ -152,7 +154,9 @@
|
|
|
<li><input type="checkbox" id="percent10" name="range" value="100"><label for="percent10"><span></span><span>100%</span></label></li>
|
|
|
</ul>
|
|
|
<div class="range">
|
|
|
- <input type="text" class="js-range-slider02" name="my_range02" value="" />
|
|
|
+ <input type="text" class="js-range-slider02" name="" value="" />
|
|
|
+ <input type="hidden" id="dcrate_input_from" value="0"/>
|
|
|
+ <input type="hidden" id="dcrate_input_to" value="0"/>
|
|
|
</div>
|
|
|
<a href="javascript:void(0)" class="tap_close">delete-btn</a>
|
|
|
</div>
|
|
|
@@ -218,18 +222,8 @@
|
|
|
<!-- 필터 -->
|
|
|
<div class="fillter">
|
|
|
<div class="fillter_box" id="filterData">
|
|
|
- <!-- <span>-->
|
|
|
- <!-- 모이몰른-->
|
|
|
- <!-- <a href="javascript:;" class="filter_delete"></a >-->
|
|
|
- <!-- </span>-->
|
|
|
- <!-- 컬러 표시 -->
|
|
|
- <!-- <span>-->
|
|
|
- <!-- <span class="pdColor-color12"></span>-->
|
|
|
- <!-- <a href="javascript:;" class="filter_delete"></a >-->
|
|
|
- <!-- </span>-->
|
|
|
- <!-- 컬러 표시 -->
|
|
|
</div>
|
|
|
- <button class="fillter_reset" onclick="fnFilterReset();"><span>전체 초기화</span></button>
|
|
|
+ <button type="button" class="fillter_reset" onclick="fnFilterReset();"><span>전체 초기화</span></button>
|
|
|
</div>
|
|
|
<!-- //필터 -->
|
|
|
</div>
|
|
|
@@ -247,15 +241,15 @@
|
|
|
<p><span id="totCntId"></span>개의 상품</p>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <ul>
|
|
|
+ <ul id="sortArea">
|
|
|
<li>
|
|
|
- <a href="" class="on">최신상품순</a>
|
|
|
+ <a href="javascript:void(0);" class="on" onclick="fnSortList(this,'new');">최신상품순</a>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <a href="">인기상품순</a>
|
|
|
+ <a href="javascript:void(0);" onclick="fnSortList(this,'best');">인기상품순</a>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <a href="">리뷰 많은순</a>
|
|
|
+ <a href="javascript:void(0);" onclick="fnSortList(this,'review');">리뷰 많은순</a>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
@@ -290,7 +284,7 @@
|
|
|
<input type="hidden" name="cate2No" th:value="${cateInfo.cate2No}"/>
|
|
|
<input type="hidden" name="cate3No" th:value="${cateInfo.cate3No}"/>
|
|
|
<input type="hidden" name="cate4No" th:value="${cateInfo.cate4No}"/>
|
|
|
- <input type="hidden" name="sortGb"/>
|
|
|
+ <input type="hidden" name="sortGb" value="new"/>
|
|
|
</form>
|
|
|
|
|
|
<script src="/ux/plugins/gaga/gaga.infinite.scrollSession.js"></script>
|
|
|
@@ -299,13 +293,17 @@
|
|
|
<script th:inline="javascript">
|
|
|
/*<![CDATA[*/
|
|
|
var filterPriceList = [[${filterPriceList}]];
|
|
|
+ var custom_values = [];
|
|
|
+ var custom_values02 = [];
|
|
|
+ var currUrl = document.location.href;
|
|
|
+ console.log('currUrl>>'+currUrl);
|
|
|
|
|
|
// 컨텐츠 호출
|
|
|
$(document).ready( function() {
|
|
|
//가격 슬라이드
|
|
|
//var custom_values = ['9,000원', '230,000원', '487,000원', '700,000원', '1,360,000원', '1,799,000원'];
|
|
|
if(!gagajf.isNull(filterPriceList)){
|
|
|
- var custom_values = [];
|
|
|
+
|
|
|
$.each(filterPriceList, function (priceIdx, priceItem){
|
|
|
custom_values[priceIdx] = priceItem.filterNm;
|
|
|
});
|
|
|
@@ -314,7 +312,6 @@
|
|
|
var my_to = custom_values.indexOf(custom_values[5]); //custom_values.indexOf('230,000원');
|
|
|
var minValue = custom_values[0];
|
|
|
var maxValue = custom_values[5];
|
|
|
- console.log('my_from>>'+my_from);
|
|
|
|
|
|
$(".dp .js-range-slider01, .sch_result .js-range-slider01").ionRangeSlider({
|
|
|
type: "double",
|
|
|
@@ -326,14 +323,22 @@
|
|
|
skin: "round",
|
|
|
postfix: "원",
|
|
|
prettify_separator: ",",
|
|
|
- values: custom_values
|
|
|
+ values: custom_values,
|
|
|
+ // onStart : function(data){
|
|
|
+ // fnCheckPrice(data);
|
|
|
+ // },
|
|
|
+ // onChange : fnCheckPrice,
|
|
|
+ onFinish : function(data){
|
|
|
+ fnCheckPrice(data);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|
|
|
//할인율
|
|
|
- var custom_values02 = ['0%', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%'];
|
|
|
+ custom_values02 = ['0%', '10%', '20%', '30%', '40%', '50%', '60%', '70%', '80%', '90%', '100%'];
|
|
|
var my_from02 = custom_values02.indexOf('0%');
|
|
|
- var my_to02 = custom_values02.indexOf('10%');
|
|
|
+ var my_to02 = custom_values02.indexOf('100%');
|
|
|
+
|
|
|
$(".dp .js-range-slider02, .sch_result .js-range-slider02").ionRangeSlider({
|
|
|
type: "double",
|
|
|
min: 0,
|
|
|
@@ -344,22 +349,87 @@
|
|
|
skin: "round",
|
|
|
postfix: "%",
|
|
|
prettify_separator: ",",
|
|
|
- values: custom_values02
|
|
|
+ values: custom_values02,
|
|
|
+ // onStart : function(data){
|
|
|
+ // fnCheckDcRate(data);
|
|
|
+ // },
|
|
|
+ // onChange : fnCheckDcRate,
|
|
|
+ onFinish : function (data){
|
|
|
+ fnCheckDcRate(data);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
fnCreateCategoryList();
|
|
|
-
|
|
|
- //fnGoodsListSearch();
|
|
|
});
|
|
|
|
|
|
+ var fnFilterOption = function (obj, stat){
|
|
|
+ var thisId = $(obj).attr('id');
|
|
|
+ var tag = '';
|
|
|
+
|
|
|
+ if(thisId == 'sexGb'){
|
|
|
+ if(stat=='on'){
|
|
|
+ $(obj).attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
+ tag += '<input type="hidden" name="sexGb" value="G007_Z"/>\n';
|
|
|
+ $("#searchGoodsForm").append(tag);
|
|
|
+ }else{
|
|
|
+ $(obj).attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
+ $("#searchGoodsForm input:hidden[name=sexGb]").remove();
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ if(stat=='on'){
|
|
|
+ $(obj).attr('onclick','fnFilterOption(this,\'off\');');
|
|
|
+ tag += '<input type="hidden" name="newProd" value="40"/>\n';
|
|
|
+ $("#searchGoodsForm").append(tag);
|
|
|
+ }else{
|
|
|
+ $(obj).attr('onclick','fnFilterOption(this,\'on\');');
|
|
|
+ $("#searchGoodsForm input:hidden[name=newProd]").remove();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fnCategoryGoodsInfiniteScrollInit();
|
|
|
+ fnGoodsListSearch();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 필터 가격 확인
|
|
|
+ var fnCheckPrice = function (data){
|
|
|
+ $("#priceSpan").remove();
|
|
|
+ $("#searchGoodsForm input:hidden[name=priceRow]").remove();
|
|
|
+ $("#searchGoodsForm input:hidden[name=priceHigh]").remove();
|
|
|
+ let min = data.from;
|
|
|
+ let max = data.to;
|
|
|
+ // console.log('Price from>>'+custom_values[min]);
|
|
|
+ // console.log('Price to>>'+custom_values[max]);
|
|
|
+ $("#price_input_from").val(custom_values[0]);
|
|
|
+ $("#price_input_to").val(custom_values[5]);
|
|
|
+
|
|
|
+ fnFilterSlider('price' , custom_values[min], custom_values[max]);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 필터 할인율 확인
|
|
|
+ var fnCheckDcRate = function (data){
|
|
|
+ $("#dcrateSpan").remove();
|
|
|
+ $("#searchGoodsForm input:hidden[name=dcrateRow]").remove();
|
|
|
+ $("#searchGoodsForm input:hidden[name=dcrateHigh]").remove();
|
|
|
+ let min = data.from;
|
|
|
+ let max = data.to;
|
|
|
+ console.log('DcRate from>>'+custom_values02[min].replace('%',''));
|
|
|
+ console.log('DcRate to>>'+custom_values02[max].replace('%',''));
|
|
|
+ $("#price_input_from").val(0);
|
|
|
+ $("#price_input_to").val(100);
|
|
|
+
|
|
|
+ fnFilterSlider('dcrate' , custom_values02[min].replace('%',''), custom_values02[max].replace('%',''));
|
|
|
+ }
|
|
|
+
|
|
|
var fnFilterReset = function (){
|
|
|
- $("#searchGoodsForm input:hidden[name=brandSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=sizeSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=priceSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=dcrateSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=seasonSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=colorSearch]").remove();
|
|
|
- $("#searchGoodsForm input:hidden[name=benefitSearch]").remove();
|
|
|
+ document.location.href = currUrl;
|
|
|
+ // $("#searchGoodsForm input:hidden[name=brandSearch]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=sizeSearch]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=priceRow]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=priceHigh]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=dcrateRow]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=dcrateHigh]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=seasonSearch]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=colorSearch]").remove();
|
|
|
+ // $("#searchGoodsForm input:hidden[name=benefitSearch]").remove();
|
|
|
}
|
|
|
|
|
|
var fnGoodsListSearch = function (){
|
|
|
@@ -380,6 +450,8 @@
|
|
|
var ithrCd = '';
|
|
|
var contentLoc = '';
|
|
|
if (result.dataList != null && result.dataList.length > 0) {
|
|
|
+ $('.list_content .list_defult').hide();
|
|
|
+ $('.list_content .count_wrap').show();
|
|
|
var goodsUrl = [[${@environment.getProperty('upload.goods.view')}]];;
|
|
|
let lastPage = result.paging.pageable.pageNo;
|
|
|
let endRow = result.endRow - result.paging.pageable.pageSize;
|
|
|
@@ -389,6 +461,9 @@
|
|
|
}else {
|
|
|
if($("#searchForm input[name=pageNo]").val()==1){
|
|
|
$('#listBox').html('<li class="none">상품정보가 존재하지 않습니다.</li>');
|
|
|
+ }else{
|
|
|
+ $('.list_content .list_defult').show();
|
|
|
+ $('.list_content .count_wrap').hide();
|
|
|
}
|
|
|
gagaInfiniteScroll.draw('not');
|
|
|
}
|
|
|
@@ -608,6 +683,17 @@
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ var fnSortList = function (obj, sortGb){
|
|
|
+ $("#sortArea").find('li').each(function (){
|
|
|
+ $(this).find('a').attr('class','off');
|
|
|
+ });
|
|
|
+
|
|
|
+ $(obj).addClass("on");
|
|
|
+ $("#searchGoodsForm").find("[name=sortGb]").val(sortGb);
|
|
|
+ fnCategoryGoodsInfiniteScrollInit();
|
|
|
+ fnGoodsListSearch();
|
|
|
+ }
|
|
|
+
|
|
|
/*]]>*/
|
|
|
</script>
|
|
|
|