Mymenuform.jsp 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <%--
  2. - FileName : mr_po_list.jsp
  3. - Author(s) :
  4. - Date : 2011.11.22
  5. - Copyright : Copyright (c)
  6. - Description:
  7. --%>
  8. <%@ page contentType="text/html; charset=utf-8" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*"%>
  11. <%@ page import="kr.co.hsnc.common.util.*" %>
  12. <%@ page import="kr.co.udapsoft.common.code.*"%>
  13. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  14. <%
  15. ctx.init(request, response);
  16. HandlerStorage storage = ctx.getHandlerStorage();
  17. ValueObject user = ctx.getUser();
  18. ValueObject params = storage.getParams();
  19. String systemSelectTag = (String)storage.getObject("SystemSelectTag");
  20. System.out.println(systemSelectTag);
  21. %>
  22. <SCRIPT language="JavaScript">
  23. // 마지막으로 선택된 행의 번호를 기억하고 있음
  24. var CurMasterRow = 0;
  25. // Sheet의 초기화 작업
  26. function initIBSheet(sheetObj) {
  27. if( sheetObj.id == "sheet1" ) {
  28. with(sheetObj) {
  29. //전체 너비 설정
  30. doResizeSheet(sheetObj);
  31. ExtendLastCol = true;
  32. //전체Merge 종류 [선택, Default msNone]
  33. MergeSheet = msAll;
  34. //전체Edit 허용 여부 [선택, Default false]
  35. Editable = true;
  36. //마우스 여러개 선택 가능 여부.
  37. MultiSelection=false;
  38. //행정보설정[필수][HEADROWS,DATAROWS,VIEWROWS,ONEPAGEROWS=100]
  39. InitRowInfo( 1, 1, 10, 100);
  40. //컬럼정보설정[필수][COLS,FROZENCOL,LEFTHEADCOLS=0,FROZENMOVE=false]
  41. InitColumnInfo(8, 0, 0, false);
  42. //해더행정보[필수][ROW,HEADTEXT,ROWMERGE=false, HIDDEN=false]
  43. InitHeadRow(0, "No|PGM_ID|SYSTEM_CODE|System|Group|Program|Screen|", false);
  44. //헤더기능설정 [선택][SortEnable, ColumnMove, AllCheckEnable, UserResize, RowMove, Head3D]
  45. InitHeadMode(false, false, true, false, false, true);
  46. //데이터속성[ROW,COL,DATATYPE,WIDTH,DATAALIGN,COLMERGE,SAVENAME,KEYFIELD,CALCULOGIC,REQ_PO_ID DATAFORMAT,POINTCOUNT,UPDATEEDIT,INSERTEDIT,EDITLEN,FULLINPUT,SORTENABLE,TOOLTIP,ALLCHECK, SAVESTATUS, FORMATFIX]
  47. var colNum = 0;
  48. InitDataProperty(0, colNum++, dtHidden, 5, daCenter, false, "NO" );
  49. InitDataProperty(0, colNum++, dtHidden, 150, daCenter, false, "PGM_ID" );
  50. InitDataProperty(0, colNum++, dtHidden, 150, daLeft, false, "SYSTEM_CODE");
  51. InitDataProperty(0, colNum++, dtData, 30, daLeft, true, "SYSTEM_NAME", false, "", dfNone, 0, false, false );
  52. InitDataProperty(0, colNum++, dtData, 150, daLeft, true, "PGM_GR_NAME" , false, "", dfNone, 0, false, false );
  53. InitDataProperty(0, colNum++, dtData, 260, daLeft, false, "PGM_NAME", false, "", dfNone, 0, false, false );
  54. InitDataProperty(0, colNum++, dtHidden, 300, daLeft, false, "SCREEN_NAME", false, "", dfNone, 0, false, false );
  55. InitDataProperty(0, colNum++, dtCheckBox, 5, daCenter, false, "CHK");
  56. Visible = true;
  57. sheetObj.ScrollBar = 2;
  58. }
  59. }
  60. else if(sheetObj.id == "sheet2"){
  61. with(sheetObj) {
  62. //전체 너비 설정
  63. doResizeSheet(sheetObj);
  64. ExtendLastCol = true;
  65. //전체Merge 종류 [선택, Default msNone]
  66. MergeSheet = msAll;
  67. //전체Edit 허용 여부 [선택, Default false]
  68. Editable = true;
  69. MultiSelection=false;
  70. //행정보설정[필수][HEADROWS,DATAROWS,VIEWROWS,ONEPAGEROWS=100]
  71. InitRowInfo( 1, 1, 10, 100);
  72. //컬럼정보설정[필수][COLS,FROZENCOL,LEFTHEADCOLS=0,FROZENMOVE=false]
  73. InitColumnInfo(8, 0, 0, false);
  74. //해더행정보[필수][ROW,HEADTEXT,ROWMERGE=false, HIDDEN=false]
  75. InitHeadRow(0, "No|PGM_ID|SYSTEM_CODE|System|Group|Program|Screen|", false);
  76. //헤더기능설정 [선택][SortEnable, ColumnMove, AllCheckEnable, UserResize, RowMove, Head3D]
  77. InitHeadMode(false, false, true, false, false, true);
  78. //데이터속성[ROW,COL,DATATYPE,WIDTH,DATAALIGN,COLMERGE,SAVENAME,KEYFIELD,CALCULOGIC,REQ_PO_ID DATAFORMAT,POINTCOUNT,UPDATEEDIT,INSERTEDIT,EDITLEN,FULLINPUT,SORTENABLE,TOOLTIP,ALLCHECK, SAVESTATUS, FORMATFIX]
  79. var colNum = 0;
  80. InitDataProperty(0, colNum++, dtHidden, 5, daCenter, false, "NO" );
  81. InitDataProperty(0, colNum++, dtHidden, 150, daCenter, false, "PGM_ID" );
  82. InitDataProperty(0, colNum++, dtHidden, 150, daLeft, false, "SYSTEM_CODE");
  83. InitDataProperty(0, colNum++, dtData, 30, daLeft, true, "SYSTEM_NAME", false, "", dfNone, 0, false, false );
  84. InitDataProperty(0, colNum++, dtData, 150, daLeft, true, "PGM_GR_NAME" ,false, "", dfNone, 0, false, false );
  85. InitDataProperty(0, colNum++, dtData, 260, daLeft, false, "PGM_NAME", false, "", dfNone, 0, false, false);
  86. InitDataProperty(0, colNum++, dtHidden, 300, daLeft, false, "SCREEN_NAME", false );
  87. InitDataProperty(0, colNum++, dtCheckBox, 5, daCenter, false, "CHK");
  88. Visible = true;
  89. sheetObj.ScrollBar = 2;
  90. }
  91. }
  92. }
  93. //Search
  94. function doSearch() {
  95. var f = document.form1;
  96. searchIBSheet("/sycs/security/Mymenu_data.screen", "GET_LEFT_MENU", f, document.all.sheet1);
  97. searchIBSheet("/sycs/security/Mymenu_data.screen", "GET_RIGHT_MENU", f, document.all.sheet2);
  98. document.form1.isSubmit = false;
  99. doResizeSheet(document.all.sheet1);
  100. doResizeSheet(document.all.sheet2);
  101. //마지막 열간격 조절 여부.
  102. document.all.sheet1.ExtendLastCol = true;
  103. document.all.sheet2.ExtendLastCol = true;
  104. }
  105. //페이지 초기화 함수
  106. function doPageInit() {
  107. doSearch();
  108. }
  109. //체크 저장 함수
  110. function doMakeMymenu(){
  111. var sheetObj = document.all.sheet1;
  112. var iCheckRow = sheetObj.CheckedRows("CHK");
  113. if(iCheckRow > 0){
  114. submitIBSheetRequest("/sycs/security/Mymenu_process.screen", "MENU_LIST_COPY", document.form1, sheetObj, "ROWSET");
  115. document.form1.isSubmit = false;
  116. }
  117. else{
  118. alertMsg('NO_SAVE','');
  119. }
  120. }
  121. //체크 지움 함수
  122. function doDelMymenu(){
  123. var sheetObj = document.all.sheet2;
  124. var iCheckRow = sheetObj.CheckedRows("CHK");
  125. if(iCheckRow > 0){
  126. submitIBSheetRequest("/sycs/security/Mymenu_process.screen", "MENU_LIST_DEL", document.form1, sheetObj, "ROWSET");
  127. document.form1.isSubmit = false;
  128. }
  129. else{
  130. alertMsg('NO_SAVE','');
  131. }
  132. }
  133. //결과 함수
  134. function doResult(resultObj) {
  135. try {
  136. if( resultObj.getRequestEvent() == "MENU_LIST_COPY" ) {
  137. if( resultObj.getSuccess() ) {
  138. alert("Save Complete!");
  139. doSearch();
  140. }
  141. else {
  142. dlgErrorMsg(resultObj);
  143. }
  144. }
  145. else if( resultObj.getRequestEvent() == "MENU_LIST_DEL" ) {
  146. if( resultObj.getSuccess() ) {
  147. alert("Delete Complete!");
  148. doSearch();
  149. }
  150. else {
  151. dlgErrorMsg(resultObj);
  152. }
  153. }
  154. }
  155. catch(errorObject) {
  156. showErrorDlg("doResult()", errorObject);
  157. }
  158. }
  159. //page close event
  160. function doClose(){
  161. self.close();
  162. }
  163. function doClear(){
  164. document.form1.pgm_gr_name.value='';
  165. document.form1.pgm_name.value='';
  166. setSelect(document.form1.system_id, '');
  167. }
  168. //페이지 초기화 함수 Call
  169. document.body.onload = doPageInit;
  170. document.body.onresize = addEvent( document.body.onresize, "doResizeSheet(document.all.sheet1)");
  171. </SCRIPT>
  172. <TABLE border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
  173. <TR>
  174. <TD height="1" valign="top">
  175. <TABLE class="screen_title_table">
  176. <TR height="2"><TD colspan="2"></TD></TR>
  177. <TR height="25">
  178. <TD width="16" valign="middle"><IMG src="/img/button/bullet_03.gif" ></TD>
  179. <TD width="100%" class="screen_title_text">My Menu Setup</TD>
  180. </TR>
  181. </TABLE>
  182. </TD>
  183. </TR>
  184. <form name="form1" style="border:0; margin:0; padding:0;">
  185. <TR>
  186. <TD height="1" valign="top" colspan="3">
  187. <TABLE cellspacing="1" cellpadding="0" class="search_table">
  188. <COLGROUP>
  189. <COL width="10%">
  190. <COL width="30%">
  191. <COL width="10%">
  192. <COL width="25%">
  193. <COL width="25%">
  194. </COLGROUP>
  195. <TR height="25">
  196. <TD class="search_table_title"><IMG src="/img/button/bullet_01.gif">System</TD>
  197. <TD class="search_table_data" style="padding-left:3px;">
  198. <%= systemSelectTag %>
  199. </TD>
  200. <TD class="search_table_title"><IMG src="/img/button/bullet_01.gif">Group Name</td>
  201. <TD class="search_table_data" style="padding-left:3px;"><input type="text" id="pgm_gr_name" name="pgm_gr_name" class="input" style="width:95%; ime-mode:disabled;" onKeyPress=""/></TD>
  202. <TD class="search_button" rowspan="2">
  203. <TABLE border="0" cellpadding="0" cellspacing="0" align="center">
  204. <TR>
  205. <TD width="10"></TD>
  206. <TD>
  207. <DIV onclick="JavaScript:doSearch();" class="button_style">
  208. <TABLE border="0" cellpadding="0" cellspacing="0">
  209. <TR>
  210. <TD class="button_left1"></TD>
  211. <TD class="button_text1">Search</TD>
  212. <TD class="button_right"></TD>
  213. </TR>
  214. </TABLE>
  215. </DIV>
  216. </TD>
  217. <TD width="5"></TD>
  218. <TD>
  219. <DIV onclick="JavaScript:doClear();" class="button_style">
  220. <TABLE border="0" cellpadding="0" cellspacing="0">
  221. <TR>
  222. <TD class="button_left1"></TD>
  223. <TD class="button_text1">Clear&nbsp;&nbsp;</TD>
  224. <TD class="button_right"></TD>
  225. </TR>
  226. </TABLE>
  227. </DIV>
  228. </TD>
  229. <TD width="5"></TD>
  230. <TD>
  231. <DIV onclick="JavaScript:doClose();" class="button_style">
  232. <TABLE border="0" cellpadding="0" cellspacing="0">
  233. <TR>
  234. <TD class="button_left1"></TD>
  235. <TD class="button_text1">close&nbsp;&nbsp;</TD>
  236. <TD class="button_right"></TD>
  237. </TR>
  238. </TABLE>
  239. </DIV>
  240. </TD>
  241. <TD width="10"></TD>
  242. </TR>
  243. </TABLE>
  244. </TD>
  245. </TR>
  246. <TR height="25">
  247. <TD class="search_table_title"><IMG
  248. src="/img/button/bullet_01.gif">Program</TD>
  249. <TD class="search_table_data" style="padding-left:3px;" colspan="3">
  250. <input type="text" id="pgm_name" name="pgm_name" class="input" style="width:40%;"/>
  251. </TD>
  252. </TR>
  253. </TABLE>
  254. <!-- 데이터 영역 : 시작 -->
  255. </TD>
  256. </TR>
  257. </form>
  258. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 시작 -->
  259. <TR>
  260. <TD height="1">
  261. <TABLE border="0" cellspacing="0" cellpadding="0" class="search_data_div_height">
  262. <TR><TD></TD></TR>
  263. </TABLE>
  264. </TD>
  265. </TR>
  266. <!-- 검색조건 영역, 테이터 영역 구분 여백 : 종료 -->
  267. <TR height="100%" >
  268. <TD id="sheet1_td" valign="top" width="45%">
  269. <DIV width="100%">
  270. <SCRIPT>
  271. var sheetObj = new IBSheetObject("sheet1");
  272. sheetObj.display();
  273. </SCRIPT>
  274. </DIV>
  275. </TD>
  276. <TD width="5%" align="center">
  277. <DIV width="100%">
  278. <TABLE cellspacing="0" cellpadding="0" class="menu_data_button">
  279. <TR>
  280. <TD id="button_1">
  281. <IMG id='menu_right_button' onClick="javeScript:doMakeMymenu();" src='/img/button/bt_arrow_1.gif' border='0' align='absmiddle' style='cursor:hand;'>
  282. </TD>
  283. </TR>
  284. <TR>
  285. <TD height="10"></TD>
  286. </TR>
  287. <TR >
  288. <TD id="button_2">
  289. <IMG id='menu_left_button' onClick="javeScript:doDelMymenu();" src='/img/button/bt_arrow_3.gif' border='0' align='absmiddle' style='cursor:hand;'>
  290. </TD>
  291. </TR>
  292. </TABLE>
  293. </DIV>
  294. </TD>
  295. <TD id="sheet2_td" valign="top" width="45%">
  296. <DIV width="100%">
  297. <SCRIPT>
  298. var sheetObj = new IBSheetObject("sheet2");
  299. sheetObj.display();
  300. </SCRIPT>
  301. </DIV>
  302. </TD>
  303. </TR>
  304. </TABLE>