음..잠시 통테용 새로고침 로직
This commit is contained in:
@@ -567,8 +567,40 @@
|
|||||||
$(window).on('resize.jqGrid', function () {
|
$(window).on('resize.jqGrid', function () {
|
||||||
jQuery("#grid").jqGrid('setGridWidth', $("#content_middle").width());
|
jQuery("#grid").jqGrid('setGridWidth', $("#content_middle").width());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const checkbox = document.getElementById('schedulerToggle');
|
||||||
|
const targetButton = document.getElementById('btn_search');
|
||||||
|
let timerId = null; // 인터벌 ID를 저장할 변수
|
||||||
|
|
||||||
|
// 체크박스 상태 변화 감지
|
||||||
|
checkbox.addEventListener('change', function() {
|
||||||
|
if (this.checked) {
|
||||||
|
console.log("스케줄러 시작: 1분 간격으로 클릭합니다.");
|
||||||
|
|
||||||
|
// 1. 즉시 한 번 실행하고 싶다면 아래 주석 해제
|
||||||
|
// targetButton.click();
|
||||||
|
|
||||||
|
// 2. 1분(60,000ms)마다 반복 실행
|
||||||
|
timerId = setInterval(() => {
|
||||||
|
console.log("자동 클릭 실행 중...");
|
||||||
|
targetButton.click();
|
||||||
|
}, 60000);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log("스케줄러 중지");
|
||||||
|
|
||||||
|
// 체크 해제 시 반복 멈춤
|
||||||
|
if (timerId) {
|
||||||
|
clearInterval(timerId);
|
||||||
|
timerId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
@@ -581,6 +613,7 @@
|
|||||||
</div><!-- end content_top -->
|
</div><!-- end content_top -->
|
||||||
<div class="content_middle" id="content_middle">
|
<div class="content_middle" id="content_middle">
|
||||||
<div class="search_wrap">
|
<div class="search_wrap">
|
||||||
|
<input type="checkbox" id="schedulerToggle">
|
||||||
<button type="button" class="cssbtn" id="btn_excel" level="W"><i
|
<button type="button" class="cssbtn" id="btn_excel" level="W"><i
|
||||||
class="material-icons">table_view</i> <%= localeMessage.getString("button.excel") %>
|
class="material-icons">table_view</i> <%= localeMessage.getString("button.excel") %>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user