SMZSA21100_화면버튼권한관리.xrw 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet ype="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list_authgrup>
  11. <menuauthgruplist/>
  12. </list_authgrup>
  13. <list_authuser>
  14. <menugrupauthlist>
  15. <menugrupnm/>
  16. <menugrupcd/>
  17. </menugrupauthlist>
  18. </list_authuser>
  19. <list_authmenu>
  20. <menuauthlist/>
  21. </list_authmenu>
  22. <item>
  23. <menuauthnm/>
  24. <menuauthcd/>
  25. </item>
  26. <list_authbutton>
  27. <buttonauthlist>
  28. </buttonauthlist>
  29. </list_authbutton>
  30. </main>
  31. <send>
  32. <menuauthgruplist/>
  33. <searchitem/>
  34. <flag/>
  35. <optmenuauthcd/>
  36. <menuauthlist/>
  37. <menugrupcd/>
  38. <scrncd/>
  39. <scrnauth/>
  40. <menugrupauthcd/>
  41. <buttonauthcd/>
  42. <buttonauthlist/>
  43. <btnauthval/>
  44. </send>
  45. <init>
  46. <flag>
  47. <lable>권한그룹명</lable>
  48. <value>menuauthnm</value>
  49. </flag>
  50. <searchitem/>
  51. <flag>
  52. <lable>권한그룹코드</lable>
  53. <value>menuauthcd</value>
  54. </flag>
  55. <flag>
  56. <lable>메뉴그룹명</lable>
  57. <value>menugrupnm</value>
  58. </flag>
  59. <flag>
  60. <lable>메뉴그룹코드</lable>
  61. <value>menugrupcd</value>
  62. </flag>
  63. <menugrupcd/>
  64. <menugrupauthcd/>
  65. <comcd>
  66. <R0061>
  67. <cdid/>
  68. <cdnm/>
  69. </R0061>
  70. <R0063>
  71. <cdid/>
  72. <cdnm/>
  73. </R0063>
  74. <Z0007>
  75. <cdid/>
  76. <cdnm/>
  77. </Z0007>
  78. <Z0016>
  79. <cdid/>
  80. <cdnm/>
  81. </Z0016>
  82. <R0059>
  83. <cdid/>
  84. <cdnm/>
  85. </R0059>
  86. <R0058>
  87. <cdid/>
  88. <cdnm/>
  89. </R0058>
  90. <R0062>
  91. <cdid/>
  92. <cdnm/>
  93. </R0062>
  94. </comcd>
  95. </init>
  96. <hidden>
  97. <temp>
  98. <menuauthlist/>
  99. </temp>
  100. </hidden>
  101. </root>
  102. </instance>
  103. <script type="javascript" ev:event="xforms-ready">
  104. <![CDATA[
  105. grd_buttonauthlist.fixedcellcheckbox(0,4) = true;
  106. grd_buttonauthlist.fixedcellcheckbox(0,5) = true;
  107. grd_buttonauthlist.fixedcellcheckbox(0,6) = true;
  108. fInitialize();
  109. cmb_menuauthgrup.select(0);
  110. zbcfGetCodeList( new Array("R0061", "R0063", "Z0007", "Z0016", "R0058", "R0059", "R0062"),
  111. new Array("/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd"),
  112. true,
  113. new Array("cdnm", "cdnm", "cdnm", "cdnm", "cdnm", "cdnm", "cdnm"),
  114. new Array("asc", "asc", "asc", "asc", "asc", "asc", "asc")
  115. );
  116. ]]>
  117. </script>
  118. <submission id="TRZBC00101" method="post" replace="instance"/>
  119. <submission id="TRZSA20400" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authgrup"/>
  120. <submission id="TXZSA20400" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  121. <submission id="TRZSA20401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authuser"/>
  122. <submission id="TRZSA20403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_menu"/>
  123. <submission id="TXZSA20401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  124. <submission id="TRZSA20406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authmenu"/>
  125. <submission id="TXZSA20402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  126. <submission id="TXZSA21100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
  127. <submission id="TRZSA21100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authbutton"/>
  128. </model>
  129. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  130. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  131. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  132. <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
  133. <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
  134. <script type="javascript">
  135. <![CDATA[
  136. /*
  137. 초기화 작업을 합니다.
  138. */
  139. function fInitialize(){
  140. model.removeNodeset("/root/main/list_authgrup/menuauthgruplist");
  141. model.removeNodeset("/root/main/list_authmenu/menuauthlist");
  142. model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
  143. model.refresh();
  144. btnAuthChkFlag = 0;
  145. }
  146. /*
  147. 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
  148. control : "search" 는 조회 버튼 클릭
  149. "init"은 신규 버튼 클릭
  150. "save"는 저장 버튼 클릭
  151. grid : 그리드 컨트롤을 넘겨줍니다.
  152. param : 기타 param을 넘겨줍니다.
  153. */
  154. function fClicked(control, grid, param){
  155. if ("search" == control){
  156. fSearchClick(grid, param);
  157. model.resetInstanceNode("/root/send");
  158. } else if ("init" == control){
  159. model.reset();
  160. } else if ("save" == control){
  161. fSaveClick(grid, param);
  162. } else if ("delete" == control){
  163. fDeleteClick(grid, param);
  164. }else {
  165. messageBox("처리를 수행","E002");
  166. }
  167. model.refresh();
  168. }
  169. /*
  170. 조회버튼 클릭 타는 함수입니다.
  171. submit을 날립니다.
  172. */
  173. function fSearchClick(grid,param){
  174. var RemNSet = "";
  175. if(param == "menuauthgrup"){
  176. RemNSet = "/root/main/list_authgrup/menuauthgruplist";
  177. } else if(param == "menuauthlist"){
  178. RemNSet = "/root/main/list_authmenu/menuauthlist";
  179. }
  180. model.removeNodeset(RemNSet);
  181. grid.rebuild();
  182. model.resetInstanceNode("/root/send");
  183. model.setValue("/root/send/searchitem", ipt_search_item.currentText);
  184. model.setValue("/root/send/flag", cmb_menuauthgrup.value);
  185. if(param == "menuauthgrup"){
  186. submit("TRZSA20400");
  187. } else if(param == "menu"){
  188. submit("TRZSA20402");
  189. } else if(param == "menugrupauthlist"){
  190. model.setValue("/root/send/menugrupauthcd", cmb_menugrupauthlist.value);
  191. model.setValue("/root/send/optmenuauthcd", opt_menuauthcd.value);
  192. submit("TRZSA20406");
  193. } else if(param == "menuauthlist"){
  194. model.setValue("/root/send/menugrupauthcd", cmb_menugrupauthlist.value);
  195. model.setValue("/root/send/optmenuauthcd", opt_menuauthcd.value);
  196. submit("TRZSA20406");
  197. } else {
  198. alert("Submit 실패입니다! 조회조건을 확인하세요!");
  199. }
  200. }
  201. /*
  202. 저장 버튼 클릭시 사는 함수입니다.
  203. submit을 날립니다.
  204. */
  205. function fSaveClick(grid, param) {
  206. // 버튼권한설정 추가
  207. for(var i = 1; i < grd_buttonauthlist.rows; i++) {
  208. var iFlag = 0;
  209. var iTypeR = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "r");
  210. var iTypeX = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "x");
  211. var iTypeP = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "p");
  212. var iBtnAuth = iTypeR + iTypeX + iTypeP;
  213. if(iBtnAuth == null || iBtnAuth == "" || iBtnAuth == "0" || iBtnAuth == "00" || iBtnAuth == "000") {
  214. iFlag = 1;
  215. }
  216. fSetRowValue("/root/main/list_authbutton/buttonauthlist", "btnauthval", iBtnAuth, i);
  217. }
  218. // 버튼 리스트의 체크박스가 선택이 안된경우 처리
  219. if(iFlag == 1) {
  220. messageBox("버튼의 속성이 선택되지", "E007");
  221. } else if((iFlag == 0) && (btnAuthChkFlag == 0)) {
  222. messageBox("변경되지", "E007");
  223. } else if((iFlag == 0) && (btnAuthChkFlag == 1)) {
  224. model.setValue("/root/send/buttonauthlist", grd_buttonauthlist.getUpdateData());
  225. if(submit("TXZSA21100")) {
  226. grid.clearstatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  227. messageBox("저장이","I002");
  228. }
  229. }
  230. }
  231. function fDeleteClick(grid, param){
  232. if(param == "menuauthgrup"){
  233. grid.addStatus(grid.row,"delete");
  234. model.setValue("/root/send/menuauthgruplist", grid.getUpdateData());
  235. if ( submit("TXZSA20400") ) {
  236. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  237. var jRow = grid.row;
  238. grid.deleteItem(jRow);
  239. }
  240. } else if(param == "menuitem"){
  241. grid.addStatus(grid.row,"delete");
  242. model.setValue("/root/send/menuitemlist", grid.getUpdateData());
  243. if ( submit("TXZSA20401") ) {
  244. grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
  245. var jRow = grid.row;
  246. grid.deleteItem(jRow);
  247. }
  248. }
  249. }
  250. function fResetNode(node, destinationelement){
  251. model.setValue(node + "/" + destinationelement, "");
  252. alert(model.elementName("/root/main/item"));
  253. }
  254. /*
  255. model.getValue(); 를 함수로 만들었습니다.
  256. param1 : node는 grid의 xPath입니다.
  257. param2 : row는 grid에서 선택한 row값입니다.
  258. param3 : element는 getvalue할 해당 element 명입니다.
  259. 해당 getvalue값을 return 해줍니다.
  260. return 하지 않으면 해당값을 가져올 수 없습니다.
  261. */
  262. function fGetValue(node, row, element) {
  263. var rtnValue = model.getValue(node + "[" + row + "]/" + element);
  264. return rtnValue;
  265. }
  266. /*
  267. model.setValue();를 함수로 만들었습니다.
  268. param1 : node는 setvalue할 컨트롤의 xPath입니다.
  269. param2 : destinationelement는 setvalue할 element명 입니다.
  270. param3 : sourceelement는 setvalue할 값입니다.
  271. */
  272. function fSetValue(node, destinationelement, sourceelement) {
  273. model.setValue(node + "/" + destinationelement, sourceelement);
  274. }
  275. /**
  276. */
  277. function fSetRowValue(node, destinationelement, sourceelement, row) {
  278. model.makeValue(node + "[" + row + "]/" + destinationelement, sourceelement);
  279. }
  280. ]]>
  281. </script>
  282. </xhtml:head>
  283. <xhtml:body guideline="1,1194;" style="font-family:굴림; font-size:12pt; font-weight:normal; margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  284. <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
  285. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:158px; height:14px; ">화면버튼권한 관리</caption>
  286. </group>
  287. <group id="grp_biz" scroll="auto" style="left:0px; top:36px; width:1195px; height:744px; ">
  288. <datagrid id="grd_menuauthlist" nodeset="/root/main/list_authmenu/menuauthlist" autoresize="false" caption="level^명^코드^상위코드^화면코드^메뉴그룹^메뉴권한코드^화면권한" colwidth="0, 285, 80, 80, 50, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:350px; top:125px; width:410px; height:615px; ">
  289. <col ref="levl" style="left:20px; top:23px; width:0px; height:23px; "/>
  290. <col ref="menuitemnm" style="left:20px; top:23px; width:285px; height:23px; "/>
  291. <col ref="menuitemcd" type="input" visibility="hidden"/>
  292. <col ref="upmenuitemcd" visibility="hidden"/>
  293. <col ref="scrncd" visibility="hidden"/>
  294. <col ref="menugrupcd" visibility="hidden"/>
  295. <col ref="menuauthcd" visibility="hidden"/>
  296. <col ref="scrnauth" visibility="hidden"/>
  297. <script type="javascript" ev:event="ondblclick">
  298. <![CDATA[
  299. //버튼리스트 초기화
  300. grd_buttonauthlist.fixedcellischeck(0,4) = false;
  301. grd_buttonauthlist.fixedcellischeck(0,5) = false;
  302. grd_buttonauthlist.fixedcellischeck(0,6) = false;
  303. var nodelist = instance1.selectNodes("/root/main/list_authbutton/buttonauthlist");
  304. if(nodelist.length > 0) {
  305. model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
  306. model.refresh();
  307. }
  308. var iRow = grd_menuauthlist.row;
  309. var iNode = "/root/main/list_authmenu/menuauthlist";
  310. var scrncd = fGetValue(iNode, iRow, "scrncd");
  311. model.setValue("/root/send/scrncd", scrncd);
  312. if(scrncd == null || scrncd == "" || scrncd == '-') {
  313. messageBox("화면이", "E014");
  314. } else if (scrncd) {
  315. submit("TRZSA21100");
  316. }
  317. ]]>
  318. </script>
  319. </datagrid>
  320. <group id="group2" style="left:5px; top:10px; width:340px; height:60px; vertical-align:top; ">
  321. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:340px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
  322. <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">메뉴권한그룹</caption>
  323. <button id="btn_search_menuauth" class="btn1_letter2" style="left:277px; top:19px; width:56px; height:22px; ">
  324. <caption>조회</caption>
  325. <script type="javascript" ev:event="DOMActivate">
  326. <![CDATA[
  327. fInitialize();
  328. fClicked("search", grd_menuauthgruplist, "menuauthgrup");
  329. ]]>
  330. </script>
  331. </button>
  332. <line id="line1" style="x1:266px; y1:8px; x2:266px; y2:51px; border-color:#ffe4bb; border-left-style:solid; "/>
  333. <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" imemode="hangul" style="left:136px; top:34px; width:114px; height:19px; ">
  334. <script type="javascript" ev:event="onkeypress">
  335. <![CDATA[
  336. inputEnterKey("btn_search_menuauth", "DOMActivate");
  337. ]]>
  338. </script>
  339. </input>
  340. <select1 id="cmb_menuauthgrup" ref="/root/init/flag" class="combo_search" appearance="minimal" style="left:136px; top:8px; width:114px; height:19px; ">
  341. <choices>
  342. <itemset nodeset="/root/init/flag">
  343. <label ref="lable"/>
  344. <value ref="value"/>
  345. </itemset>
  346. </choices>
  347. </select1>
  348. </group>
  349. <caption id="caption9" class="tit_2" style="left:5px; top:85px; width:111px; height:13px; vertical-align:middle; ">메뉴권한 그룹</caption>
  350. <line id="line12" class="line_1" style="x1:7px; y1:100px; x2:345px; y2:100px; "/>
  351. <datagrid id="grd_menuauthgruplist" nodeset="/root/main/list_authgrup/menuauthgruplist" caption="명^코드" colwidth="100, 100" dataheight="25" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="32" style="left:5px; top:105px; width:340px; height:635px; ">
  352. <col ref="menuauthnm" type="input" _key="true"/>
  353. <col ref="menuauthcd" visibility="hidden"/>
  354. <script type="javascript" ev:event="ondblclick">
  355. <![CDATA[
  356. grd_menuauthgruplist.gridToInstance();
  357. var iRow = grd_menuauthgruplist.row;
  358. if("" != model.getValue("/root/main/list_authgrup/menuauthgruplist["+iRow+"]/menuauthnm")){
  359. grd_menuauthlist.explorerbar = "sortshow";
  360. var nodelist = instance1.selectNodes("/root/main/list_authbutton/buttonauthlist");
  361. if(nodelist.length > 0) {
  362. model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
  363. model.refresh();
  364. }
  365. model.resetInstanceNode("/root/main/list_authmenu/menuauthlist");
  366. model.resetInstanceNode("/root/send");
  367. var iRow = grd_menuauthgruplist.row;
  368. var iNode = "/root/main/list_authgrup/menuauthgruplist"
  369. model.setValue("/root/main/item/menuauthnm", fGetValue(iNode, iRow, "menuauthnm"));
  370. model.setValue("/root/main/item/menuauthcd", fGetValue(iNode, iRow, "menuauthcd"));
  371. var iOptmenuauthcd = model.getValue("/root/main/item/menuauthcd");
  372. model.setValue("/root/send/optmenuauthcd", iOptmenuauthcd );
  373. submit("TRZSA20401");
  374. model.setValue("/root/init/menugrupauthcd", model.getValue("/root/main/list_authuser/menugrupauthlist[1]/menugrupcd"));
  375. cmb_menugrupauthlist.dispatch("xforms-select");
  376. }
  377. ]]>
  378. </script>
  379. </datagrid>
  380. <caption id="caption5" class="tit_2" style="left:349px; top:105px; width:124px; height:13px; ">메뉴권한 리스트</caption>
  381. <line id="line5" class="line_1" style="x1:350px; y1:120px; x2:760px; y2:120px; "/>
  382. <group id="group3" style="left:350px; top:61px; width:410px; height:35px; vertical-align:top; ">
  383. <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:410px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
  384. <caption id="caption10" class="search_name" style="left:15px; top:9px; width:164px; height:17px; ">메뉴권한 적용 메뉴그룹</caption>
  385. <select1 id="cmb_menugrupauthlist" ref="/root/init/menugrupauthcd" appearance="minimal" style="left:195px; top:9px; width:130px; height:19px; ">
  386. <choices>
  387. <itemset nodeset="/root/main/list_authuser/menugrupauthlist">
  388. <label ref="menugrupnm"/>
  389. <value ref="menugrupcd"/>
  390. </itemset>
  391. </choices>
  392. <script type="javascript" ev:event="xforms-select">
  393. <![CDATA[
  394. grd_menuauthlist.rebuild();
  395. fClicked("search", grd_menuauthlist, "menuauthlist");
  396. setTree(grd_menuauthlist, 1, 2, true);
  397. ]]>
  398. </script>
  399. </select1>
  400. </group>
  401. <group id="group4" style="left:350px; top:10px; width:844px; height:45px; vertical-align:top; ">
  402. <caption id="caption11" class="cell_1" style="left:0px; top:20px; width:135px; height:23px; ">메뉴권한 그룹(명/코드)</caption>
  403. <output id="opt_menuauthnm" ref="/root/main/item/menuauthnm" class="output_fix" style="left:138px; top:21px; width:135px; height:19px; "/>
  404. <output id="opt_menuauthcd" ref="/root/main/item/menuauthcd" class="output_fix" style="left:276px; top:21px; width:135px; height:19px; "/>
  405. <caption id="caption12" class="tit_2" style="left:0px; top:0px; width:169px; height:14px; ">선택 메뉴권한</caption>
  406. <line id="line7" class="line_1" style="x1:0px; y1:15px; x2:843px; y2:15px; "/>
  407. <line id="line8" class="line_3" style="x1:1px; y1:42px; x2:843px; y2:42px; "/>
  408. </group>
  409. <datagrid id="grd_buttonauthlist" nodeset="/root/main/list_authbutton/buttonauthlist" allowuserresize="true" autoresize="false" caption="level^버튼객체명^버튼객체ID^R^X^P^기관코드^화면코드^버튼권한값^버튼권한코드" colwidth="0, 100, 200, 34, 34, 34, 100, 100, 100, 100" dataheight="23" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" style="left:766px; top:125px; width:428px; height:615px; ">
  410. <col ref="scrncd" visibility="hidden"/>
  411. <col explorerbar="sortshow" ref="btnobjnm"/>
  412. <col explorerbar="sortshow" ref="btnobjid"/>
  413. <col checkvalue="R,0" ref="r" type="checkbox"/>
  414. <col checkvalue="X,0" ref="x" type="checkbox"/>
  415. <col checkvalue="P,0" ref="p" type="checkbox"/>
  416. <col ref="instcd" visibility="hidden"/>
  417. <col ref="btnauthval" visibility="hidden"/>
  418. <script type="javascript" ev:event="xforms-value-changed">
  419. <![CDATA[
  420. // R,X,P 체크박스중 하나만 체크한다.
  421. var pSelectR = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r");
  422. var pSelectX = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x");
  423. var pSelectP = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p");
  424. if((grd_buttonauthlist.col == grd_buttonauthlist.colRef("r")) && pSelectR == "R") {
  425. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x","0");
  426. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p","0");
  427. } else if((grd_buttonauthlist.col==grd_buttonauthlist.colRef("x")) && pSelectX == "X") {
  428. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r","0");
  429. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p","0");
  430. } else if((grd_buttonauthlist.col==grd_buttonauthlist.colRef("p")) && pSelectP == "P") {
  431. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r","0");
  432. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x","0");
  433. }
  434. btnAuthChkFlag = 1;
  435. model.refresh();
  436. ]]>
  437. </script>
  438. <script type="javascript" ev:event="xforms-select">
  439. <![CDATA[
  440. // 그리드 캡션 부분의 체크박스를 선택했을때 처리( row 0번째 체크박스)
  441. if(grd_buttonauthlist.row == "0") {
  442. if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("r")) {
  443. grd_buttonauthlist.fixedcellischeck(0,5) = false;
  444. grd_buttonauthlist.fixedcellischeck(0,6) = false;
  445. } else if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("x")) {
  446. grd_buttonauthlist.fixedcellischeck(0,4) = false;
  447. grd_buttonauthlist.fixedcellischeck(0,6) = false;
  448. } else if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("p")) {
  449. grd_buttonauthlist.fixedcellischeck(0,4) = false;
  450. grd_buttonauthlist.fixedcellischeck(0,5) = false;
  451. }
  452. //그리드의 상태를 update로 함
  453. for(var i = 1; i < grd_buttonauthlist.rows; i++){
  454. grd_buttonauthlist.addStatus(i, "update");
  455. }
  456. btnAuthChkFlag = 1;
  457. }
  458. ]]>
  459. </script>
  460. </datagrid>
  461. <caption id="caption2" class="tit_2" style="left:765px; top:105px; width:165px; height:13px; ">버튼권한 리스트</caption>
  462. <line id="line2" class="line_1" style="x1:766px; y1:120px; x2:1194px; y2:120px; "/>
  463. <button id="btn_delete_buttonauth" class="btn2_letter2" style="left:1102px; top:100px; width:42px; height:19px; ">
  464. <caption>삭제</caption>
  465. <script type="javascript" ev:event="DOMActivate">
  466. <![CDATA[
  467. ]]>
  468. </script>
  469. </button>
  470. <button id="btn_save_buttonauth" class="btn5_letter2" style="left:1152px; top:100px; width:42px; height:19px; ">
  471. <caption>저장</caption>
  472. <script type="javascript" ev:event="DOMActivate">
  473. <![CDATA[
  474. fClicked("save", grd_buttonauthlist, "buttonauthlist");
  475. btn_search_buttonauth.dispatch("DOMActivate");
  476. ]]>
  477. </script>
  478. </button>
  479. <button id="btn_add_buttonauth" class="btn2_letter2" style="left:1052px; top:100px; width:42px; height:19px; ">
  480. <caption>등록</caption>
  481. <script type="javascript" ev:event="DOMActivate">
  482. <![CDATA[
  483. var iRow = grd_menuauthlist.row;
  484. var iNode = "/root/main/list_authmenu/menuauthlist";
  485. var scrncd = fGetValue(iNode, iRow, "scrncd");
  486. if(scrncd == null || scrncd == "" || scrncd == '-') {
  487. messageBox("화면이", "E014");
  488. } else if (scrncd) {
  489. open(scrncd);
  490. /* 등록버튼 클릭시
  491. if 버튼리스트에 첫 row가 없으면
  492. 버튼들을 모두 등록
  493. else if 조회된 값이 있으면
  494. 현재 리스트와 화면에서 얻어온 버튼 id를 비교하여 없는 것이 있으면 추가하고 추가한것만 update표시
  495. */
  496. var wndObj = getOpenWindow(scrncd);
  497. var btnCtrlInfo = wndObj.javascript.getBtnCtrlInfo();
  498. var jRows = grd_buttonauthlist.rows;
  499. var jNode = "/root/main/list_authbutton/buttonauthlist";
  500. var curBtnObjId = new Array();
  501. for(var i = 0; i < jRows; i++) {
  502. curBtnObjId[i] = model.getValue("/root/main/list_authbutton/buttonauthlist[" + (i+1) + "]/btnobjid");
  503. }
  504. // 그리드에 등록되어 있는 버튼이 하나도 없고, 화면에 버튼이 있으면
  505. // 화면의 버튼을 얻어와 그리드에 추가한다.
  506. if(curBtnObjId.length <= 1 && wndObj != null) {
  507. for(var i=0; i < btnCtrlInfo.length; i++) {
  508. grd_buttonauthlist.addRow(false, true);
  509. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjid", btnCtrlInfo[i].btnID);
  510. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjnm", btnCtrlInfo[i].btnTxt);
  511. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/scrncd", scrncd);
  512. }
  513. // 그리드에 등록되어 있는 버튼이 있다면
  514. // 그리드에 등록되어 있는 버튼과 현재화면의 버튼을 비교하여
  515. // 없는 버튼을 추가한다.
  516. } else if((curBtnObjId.length > 1) && ((curBtnObjId.length -1) == btnCtrlInfo.length)) {
  517. messageBox("이미 모든 버튼이 등록되어", "I010");
  518. } else if((curBtnObjId.length > 1) && ((curBtnObjId.length -1) < btnCtrlInfo.length)) {
  519. var j = (btnCtrlInfo.length - (curBtnObjId.length-1));
  520. alert("등록되지 않은 버튼이 " + j + "개 있습니다. 버튼을 추가합니다");
  521. for(var i=0; i<btnCtrlInfo.length; i++) {
  522. var pflag = model.getValue("/root/main/list_authbutton/buttonauthlist[btnobjid='" + btnCtrlInfo[i].btnID + "']/btnobjid");
  523. if(pflag == "" || pflag == null){
  524. grd_buttonauthlist.addRow(false, true);
  525. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjid", btnCtrlInfo[i].btnID);
  526. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjnm", btnCtrlInfo[i].btnTxt);
  527. model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/scrncd", scrncd);
  528. }
  529. }
  530. }
  531. model.refresh();
  532. }
  533. ]]>
  534. </script>
  535. </button>
  536. <button id="btn_search_buttonauth" class="btn2_letter2" style="left:1002px; top:100px; width:42pexx; height:19px; ">
  537. <caption>조회</caption>
  538. <script type="javascript" ev:event="DOMActivate">
  539. <![CDATA[
  540. btnAuthChkFlag = 0;
  541. grd_buttonauthlist.fixedcellischeck(0,4) = false;
  542. grd_buttonauthlist.fixedcellischeck(0,5) = false;
  543. grd_buttonauthlist.fixedcellischeck(0,6) = false;
  544. submit("TRZSA21100");
  545. ]]>
  546. </script>
  547. </button>
  548. </group>
  549. <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
  550. <line id="line9" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  551. </group>
  552. </xhtml:body>
  553. </xhtml:html>