SYSRightRegPgmList.jsp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <%--
  2. - FileName : SYSRightRegPgmList.jsp
  3. - Author : gyeongmo an
  4. - Date : 2014.06.22
  5. - Copyright : Copyright (c) www.udapsoft.co.kr, Inc.
  6. - All rights reserved.
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="kr.co.hsnc.common.util.ValueObject"%>
  11. <%@ include file="/jsp/work/taglib.jsp" %>
  12. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  13. <%
  14. ctx.init(request, response);
  15. ValueObject user = ctx.getUser();
  16. String USER_ID = user.get("ACCT_ID");
  17. HandlerStorage storage = ctx.getHandlerStorage();
  18. String systemSelectTag = (String)storage.getObject("SystemSelectTag");
  19. String selectText = (String)storage.getObject("selectText");
  20. String selectValue = (String)storage.getObject("selectValue");
  21. String url = request.getRequestURL().toString();
  22. url = url.substring(0, url.indexOf("/",7));
  23. %>
  24. <SCRIPT language="JavaScript">
  25. /*예약함수*/
  26. var sheet1;
  27. var sheet1Row;
  28. var sheet1PageNo = 1;
  29. var pageLastRowIndex = 1;
  30. var validationResult = false;
  31. var filterShow = false;
  32. function _onReady(){
  33. gridInit(sheet1);
  34. jQuery("#btnSearch").click(function() {
  35. var sort_gb_value = $(':radio[name="sort_gb"]:checked').val();
  36. document.form1.sort_gb_value.value = sort_gb_value;
  37. jQuery("#fevent").val("GET_PGL_LIST");
  38. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/security/SYSRightRegPgmList_sheet.screen";
  39. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  40. });
  41. jQuery("#btnAdd").click(function() {
  42. var rowIdx = sheet1.DataInsert(-1);
  43. });
  44. jQuery("#btnSave").click(function() {
  45. if (confirm("저장하시겠습니까?")) {
  46. jQuery("#fevent").val("SAVE_PGL_LIST");
  47. var url = Modular.model.PageContext.CONTEXT_ROOT + "/sycs/security/SYSRightRegPgmList_sheet.screen";
  48. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  49. }
  50. });
  51. jQuery("#btnReset").click(function() {
  52. var f = document.form1;
  53. f.system_id.value = "";
  54. f.pgm_name2.value = "";
  55. f.screen_name2.value = "";
  56. setRadio(f.sort_gb, "PGM_ID");
  57. });
  58. autoResize();
  59. }
  60. function gridInit(sheetName){
  61. var init_sheet = {};
  62. init_sheet.Cfg = {SearchMode:2, Page:30};
  63. init_sheet.Cols = [
  64. {Header:'상태', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  65. {Header:'삭제', Type:"DelCheck", SaveName:"DEL_CHECK", Width:50, Align:"Center"},
  66. {Header:'번호', Type:"Seq", SaveName:"NO", Width:80, Align:"Center"},
  67. {Header:'시스템', Type:"Combo", SaveName:"SYSTEM_ID", Width:100, KeyField:"True", Align:"Center", ComboText:"<%=selectText%>", ComboCode:"<%=selectValue%>"},
  68. {Header:'프로그램', Type:"Text", SaveName:"PGM_NAME", Width:150, KeyField:"True", Align:"Left" },
  69. {Header:'☞ Screen', Type:"PopupEdit", SaveName:"SCREEN_NAME", Width:290, Align:"Left" },
  70. {Header:'비고', Type:"Text", SaveName:"DSCR", Width:220, Align:"Left" },
  71. {Header:'수정자', Type:"Text", SaveName:"UPD_BY", Width:60, Align:"Center", Edit:"false"},
  72. {Header:'수정일자', Type:"Date", SaveName:"UPD_DATE", Width:100, Align:"Center", Edit:"false"},
  73. {Header:'screen_code', Type:"Text", SaveName:"SYSTEM_CODE", Width:120, Align:"Left", Hidden:"True" },
  74. {Header:'프로그램ID.', Type:"Text", SaveName:"PGM_ID", Width:0, Align:"Left", Hidden:"True" }
  75. ];
  76. init_sheet.HeaderMode = {Sort:1};
  77. IBS_InitSheet(sheetName, init_sheet);
  78. sheetName.SetDataAutoTrim(0);
  79. setGridSize();
  80. }
  81. function sheet1_OnSearchEnd(code, message) {
  82. if(code == 0) {
  83. setGridSize();
  84. } else {
  85. //조회 에러 수행
  86. //alert(message);
  87. alert("조회 실패");
  88. }
  89. }
  90. function sheet1_OnSaveEnd(code, msg) {
  91. if(code >= 0) {
  92. alert("저장 성공!");
  93. } else {
  94. //alert(msg);
  95. alert("저장 실패");
  96. }
  97. jQuery("#btnSearch").click();
  98. }
  99. function setGridSize() {
  100. sheet1.FitColWidth();
  101. }
  102. function sheet1_OnPopupClick(Row, Col) {
  103. //행을 클릭했을 때 다른 페이지로 이동하도록 처리
  104. var sName = sheet1.ColSaveName(Col);
  105. var sScreen = sheet1.GetCellValue(Row,Col);
  106. var url = "<%=url%>";
  107. if(sName == "SCREEN_NAME")
  108. {
  109. var sUrl = url + sScreen;
  110. window.open(sUrl);
  111. }
  112. }
  113. function sheet1_OnSmartResize(Width, Height) {
  114. sheet1.FitColWidth();
  115. autoResize();
  116. }
  117. function autoResize(){
  118. var t1_height = document.getElementById("search-table").scrollHeight + document.getElementById("title").scrollHeight + 24;
  119. var iframeHeight= document.body.scrollHeight - t1_height;
  120. sheet1.SetSheetHeight(iframeHeight);
  121. }
  122. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  123. </SCRIPT>
  124. <modular:search id="form1">
  125. <modular:key id="fevent" />
  126. </modular:search>
  127. <form id="form1" name="form1" method="post" modular:type="search" style="width:100%;height:100%;">
  128. <INPUT type="hidden" name="fevent" id="fevent" value="">
  129. <INPUT type="hidden" name="sort_gb_value" id="sort_gb_value" value="">
  130. <div align="left" id="title">
  131. <ul>
  132. <li>프로그램 관리</li>
  133. </ul>
  134. </div>
  135. <!-- 검색조건 시작 -->
  136. <table id="search-table" class="search-form-table">
  137. <colgroup>
  138. <col width="100" />
  139. <col width="400" />
  140. <col width="100" />
  141. <col width="*" />
  142. <col width="250" />
  143. </colgroup>
  144. <tr>
  145. <th>시스템</th>
  146. <td>
  147. <%=systemSelectTag%>
  148. </td>
  149. <th>프로그램</th>
  150. <td>
  151. <input type='text' name="pgm_name2" class="input" style="width:90%">
  152. </td>
  153. <td class="button" rowspan="2">
  154. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSearch">검색</a></span>
  155. <span class="btnSearch center"><a href="javascript:void(0);" id="btnClear">초기화</a></span>
  156. <span class="btnSearch center"><a href="javascript:void(0);" id="btnAdd">추가</a></span>
  157. <span class="btnSearch center"><a href="javascript:void(0);" id="btnSave">저장</a></span>
  158. </td>
  159. </tr>
  160. <tr>
  161. <th>Screen</th>
  162. <td>
  163. <input type='text' name="screen_name2" class="input" style="width:94%">
  164. </td>
  165. <th>정렬</th>
  166. <td>
  167. <LABEL for="sort_gb_1"><INPUT id="sort_gb_1" type="radio" name="sort_gb" value="PGM_ID" checked>등록순</LABEL>
  168. <LABEL for="sort_gb_2"><INPUT id="sort_gb_2" type="radio" name="sort_gb" value="PGM_NAME">프로그램명</LABEL>
  169. <LABEL for="sort_gb_3"><INPUT id="sort_gb_3" type="radio" name="sort_gb" value="SCREEN_NAME">SCREEN</LABEL>
  170. </td>
  171. </tr>
  172. </table>
  173. <!-- 검색조건 종료 -->
  174. <div id="sheet1_div" style="padding-top:5px; height: auto; min-height: 350px; overflow: auto;">
  175. <script>createIBSheet('sheet1','100%', '350px');</script>
  176. </div>
  177. </FORM>