Просмотр исходного кода

상품목록, 상품조회팝업 멀티셀렉박스 처리

eskim 5 лет назад
Родитель
Сommit
918d1b913c

+ 12 - 12
src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -97,9 +97,9 @@
 						<td>
 							<div class="multiCheckBox"  style="width:300px">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:170px;">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
-									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:170px;" id="grpItemkind">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpItemkind')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox" data-group="grpItemkind"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>
 						</td>
@@ -107,9 +107,9 @@
 						<td>
 							<div class="multiCheckBox"  style="width:200px">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:170px">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiGoodsStat" onclick="uifnAllCheck('multiGoodsStat')">전체선택</label></li>
-									<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:170px" id="grpGoodsStat">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpGoodsStat')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+									<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox" data-group="grpGoodsStat"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>
 						</td>
@@ -134,16 +134,16 @@
 							</select> -->
 							<div class="multiCheckBox" style="width:140px;">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:140px">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
-									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:140px" id="grpStyle">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpStyle')"><input type="checkbox" name="전체선택" id="multiStyleYear" >전체선택</label></li>
+									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox" data-group="grpStyle"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>
 							<div class="multiCheckBox" style="width:170px;">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:170px">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
-									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:170px" id="grpSeason">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpSeason')"><input type="checkbox" name="전체선택" id="multiSeasonCd" >전체선택</label></li>
+									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox" data-group="grpSeason"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>		
 						</td>

+ 14 - 14
src/main/webapp/WEB-INF/views/goods/GoodsPopupListForm.html

@@ -80,19 +80,19 @@
 					<td>
 						<div class="multiCheckBox"  style="width:300px">
 							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px;">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiItemkindCd" onclick="uifnAllCheck('multiItemkindCd')">전체선택</label></li>
-								<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox"><input type="checkbox" name="multiItemkindCd" th:id="${'pitemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
-							</ul>
+							<ul style="overflow:auto; height:170px;" id="grpPItemkind">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpPItemkind')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+									<li th:if="${itemkindList}" th:each="oneData, status : ${itemkindList}"><label class="chkBox" data-group="grpPItemkind"><input type="checkbox" name="multiItemkindCd" th:id="${'itemkindCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
 						</div>
 					</td>
 					<th>상품상태</th>
 					<td>
 						<div class="multiCheckBox"  style="width:200px">
 							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px">
-								<li><label class="chkBox" onclick="uifnAllCheck('multiGoodsStat')"><input type="checkbox" name="전체선택" id="multiGoodsStat" >전체선택</label></li>
-								<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox"><input type="checkbox" name="multiGoodsStat" th:id="${'pgoodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							<ul style="overflow:auto; height:170px" id="grpPGoodsStat">
+								<li><label class="chkBox" onclick="uifnAllCheck(this,'grpPGoodsStat')"><input type="checkbox" name="전체선택" >전체선택</label></li>
+								<li th:if="${goodsStatList}" th:each="oneData, status : ${goodsStatList}"><label class="chkBox" data-group="grpPGoodsStat"><input type="checkbox" name="multiGoodsStat" th:id="${'goodsStat' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 							</ul>
 						</div>
 					</td>
@@ -118,17 +118,17 @@
 						</select> -->
 						<div class="multiCheckBox" style="width:140px;">
 							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:140px">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
-								<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'pstyleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+							<ul style="overflow:auto; height:140px" id="grpPStyle">
+								<li><label class="chkBox" onclick="uifnAllCheck(this,'grpPStyle')"><input type="checkbox" name="전체선택" id="multiStyleYear" >전체선택</label></li>
+								<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox" data-group="grpPStyle"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 							</ul>
 						</div>
 						<div class="multiCheckBox" style="width:170px;">
 							<button type="button" class="sltBtn">[전체]</button>
-							<ul style="overflow:auto; height:170px">
-								<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
-								<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'pseasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
-							</ul>
+							<ul style="overflow:auto; height:170px" id="grpPSeason">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpPSeason')"><input type="checkbox" name="전체선택" id="multiSeasonCd" >전체선택</label></li>
+									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox" data-group="grpPSeason"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								</ul>
 						</div>
 					</td>
 					<th>연령대</th>

+ 6 - 6
src/main/webapp/WEB-INF/views/goods/GoodsQuikDeliverySkipForm.html

@@ -73,16 +73,16 @@
 						<td colspan="5">
 							<div class="multiCheckBox" style="width:140px;">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:140px">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiStyleYear" onclick="uifnAllCheck('multiStyleYear')">전체선택</label></li>
-									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:140px" id="grpStyle">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpStyle')"><input type="checkbox" name="전체선택" id="multiStyleYear" >전체선택</label></li>
+									<li th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}"><label class="chkBox" data-group="grpStyle"><input type="checkbox" name="multiStyleYear" th:id="${'styleYear' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>
 							<div class="multiCheckBox" style="width:170px;">
 								<button type="button" class="sltBtn">[전체]</button>
-								<ul style="overflow:auto; height:170px">
-									<li><label class="chkBox"><input type="checkbox" name="전체선택" id="multiSeasonCd" onclick="uifnAllCheck('multiSeasonCd')">전체선택</label></li>
-									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
+								<ul style="overflow:auto; height:170px" id="grpSeason">
+									<li><label class="chkBox" onclick="uifnAllCheck(this,'grpSeason')"><input type="checkbox" name="전체선택" id="multiSeasonCd" >전체선택</label></li>
+									<li th:if="${seasonList}" th:each="oneData, status : ${seasonList}"><label class="chkBox" data-group="grpSeason"><input type="checkbox" name="multiSeasonCd" th:id="${'seasonCd' + oneData.cd}" th:value="${oneData.cd}" ><th:block th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></th:block></label></li>
 								</ul>
 							</div>		
 						</td>

+ 0 - 23
src/main/webapp/ux/js/admin.popup.js

@@ -1,26 +1,3 @@
-/*
-
- * Popup Java Script by gagamel
- *
- * Copyright (c) 2010 gagamel
- *
- * $Date: 2019-08-06 $
- */
-
-//체크박스 전체선택
-function uifnAllCheck(id) {
-	var $thisId = $("#" + id);
-	if ($thisId.hasClass("checked")) {
-		$thisId.removeClass("checked");
-		$("input[name=" + id + "]").parent("label").removeClass("checked");
-		$("input[name=" + id + "]").prop("checked", false);
-	} else {
-		$thisId.addClass("checked");
-		$("input[name=" + id + "]").parent("label").addClass("checked");
-		$("input[name=" + id + "]").prop("checked", true);
-	};
-	return false;
-};
 
 /**
  * @type   : function