From 561caf841b870ee28f65ffe6af497feeb6fa45dd Mon Sep 17 00:00:00 2001 From: Rinjae Date: Tue, 20 Jan 2026 11:24:03 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A8=EB=8B=88=ED=84=B0=EB=A7=81=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=8D=BC=ED=8B=B0=20=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/monitoringPropertyManDetail.jsp | 67 ++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/WebContent/jsp/common/property/monitoringPropertyManDetail.jsp b/WebContent/jsp/common/property/monitoringPropertyManDetail.jsp index 1a5271a..97c8820 100644 --- a/WebContent/jsp/common/property/monitoringPropertyManDetail.jsp +++ b/WebContent/jsp/common/property/monitoringPropertyManDetail.jsp @@ -306,6 +306,45 @@ var lastsel2; buttonControl(key); titleControl(key); + + // 검색 기능 + $("#btn_search").click(function() { + filterGrid(); + }); + + // 엔터키로 검색 + $("#searchText").keypress(function(e) { + if (e.which == 13) { + filterGrid(); + return false; + } + }); + + // 초기화 버튼 + $("#btn_reset").click(function() { + $("#searchText").val(""); + filterGrid(); + }); + + function filterGrid() { + var searchText = $("#searchText").val().toLowerCase(); + var grid = $("#grid"); + + // 모든 행을 순회하며 필터링 + var ids = grid.jqGrid('getDataIDs'); + for (var i = 0; i < ids.length; i++) { + var rowData = grid.jqGrid('getRowData', ids[i]); + var prptyName = (rowData.PRPTYNAME || "").toLowerCase(); + var prptyVal = (rowData.PRPTY2VAL || "").toLowerCase(); + + // 검색어가 비어있거나, 프로퍼티 키 또는 값에 포함되어 있으면 표시 + if (searchText === "" || prptyName.indexOf(searchText) >= 0 || prptyVal.indexOf(searchText) >= 0) { + $("#" + ids[i]).show(); + } else { + $("#" + ids[i]).hide(); + } + } + } }); @@ -359,10 +398,36 @@ var lastsel2; + + + +
- + + + \ No newline at end of file