|
@@ -570,7 +570,7 @@
|
|
|
|
|
|
|
|
<form id="searchGoodsForm" name="searchGoodsForm">
|
|
<form id="searchGoodsForm" name="searchGoodsForm">
|
|
|
<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
|
|
<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
|
|
|
- <input type="hidden" name="pageSize" value ="30"/>
|
|
|
|
|
|
|
+ <input type="hidden" name="pageSize" value ="50"/>
|
|
|
<input type="hidden" name="keyword" th:value="${params.keyword}"/>
|
|
<input type="hidden" name="keyword" th:value="${params.keyword}"/>
|
|
|
<input type="hidden" name="sortingType" value="NEW"/>
|
|
<input type="hidden" name="sortingType" value="NEW"/>
|
|
|
</form>
|
|
</form>
|
|
@@ -585,17 +585,22 @@
|
|
|
gagaInfiniteScroll.getHistory();
|
|
gagaInfiniteScroll.getHistory();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ var totalCnt = 0;
|
|
|
|
|
+ var idx = 1;
|
|
|
// 상품 검색
|
|
// 상품 검색
|
|
|
var fnGetInfiniteScrollDataList = function (pageNum) {
|
|
var fnGetInfiniteScrollDataList = function (pageNum) {
|
|
|
$("#searchGoodsForm input[name=pageNo]").val(pageNum + 1);
|
|
$("#searchGoodsForm input[name=pageNo]").val(pageNum + 1);
|
|
|
// gagajf.ajaxFormSubmit("/display/search/goods/list", document.searchGoodsForm, function(result) {
|
|
// gagajf.ajaxFormSubmit("/display/search/goods/list", document.searchGoodsForm, function(result) {
|
|
|
// console.log(result);
|
|
// console.log(result);
|
|
|
// }, true);
|
|
// }, true);
|
|
|
- gagajf.ajaxFormSubmit("/display/search/goods/list", document.searchGoodsForm, gagaInfiniteScroll.jsonToHtml);
|
|
|
|
|
|
|
+ if(idx==1 || totalCnt > Number($("#searchGoodsForm").find("input[name=pageSize]").val())){
|
|
|
|
|
+ idx++;
|
|
|
|
|
+ gagajf.ajaxFormSubmit("/display/search/goods/list", document.searchGoodsForm, gagaInfiniteScroll.jsonToHtml);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var fnDrawInfiniteScrollData = function (result){
|
|
var fnDrawInfiniteScrollData = function (result){
|
|
|
- let totalCnt = result.paging.totalCount;
|
|
|
|
|
|
|
+ totalCnt = result.paging.totalCount;
|
|
|
$("#totCntId").text(totalCnt.addComma());
|
|
$("#totCntId").text(totalCnt.addComma());
|
|
|
$("#prodListCnt").text('('+totalCnt.addComma()+')');
|
|
$("#prodListCnt").text('('+totalCnt.addComma()+')');
|
|
|
gagaInfiniteScroll.pageStatus.totalCount = totalCnt;
|
|
gagaInfiniteScroll.pageStatus.totalCount = totalCnt;
|