123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet ype="text/css" href="../../../com/commonweb/css/common.css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <list_authgrup>
- <menuauthgruplist/>
- </list_authgrup>
- <list_authuser>
- <menugrupauthlist>
- <menugrupnm/>
- <menugrupcd/>
- </menugrupauthlist>
- </list_authuser>
- <list_authmenu>
- <menuauthlist/>
- </list_authmenu>
- <item>
- <menuauthnm/>
- <menuauthcd/>
- </item>
- <list_authbutton>
- <buttonauthlist>
- </buttonauthlist>
- </list_authbutton>
- </main>
- <send>
- <menuauthgruplist/>
- <searchitem/>
- <flag/>
- <optmenuauthcd/>
- <menuauthlist/>
- <menugrupcd/>
- <scrncd/>
- <scrnauth/>
- <menugrupauthcd/>
- <buttonauthcd/>
- <buttonauthlist/>
- <btnauthval/>
- </send>
- <init>
- <flag>
- <lable>권한그룹명</lable>
- <value>menuauthnm</value>
- </flag>
- <searchitem/>
- <flag>
- <lable>권한그룹코드</lable>
- <value>menuauthcd</value>
- </flag>
- <flag>
- <lable>메뉴그룹명</lable>
- <value>menugrupnm</value>
- </flag>
- <flag>
- <lable>메뉴그룹코드</lable>
- <value>menugrupcd</value>
- </flag>
- <menugrupcd/>
- <menugrupauthcd/>
- <comcd>
- <R0061>
- <cdid/>
- <cdnm/>
- </R0061>
- <R0063>
- <cdid/>
- <cdnm/>
- </R0063>
- <Z0007>
- <cdid/>
- <cdnm/>
- </Z0007>
- <Z0016>
- <cdid/>
- <cdnm/>
- </Z0016>
- <R0059>
- <cdid/>
- <cdnm/>
- </R0059>
- <R0058>
- <cdid/>
- <cdnm/>
- </R0058>
- <R0062>
- <cdid/>
- <cdnm/>
- </R0062>
- </comcd>
- </init>
- <hidden>
- <temp>
- <menuauthlist/>
- </temp>
- </hidden>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- grd_buttonauthlist.fixedcellcheckbox(0,4) = true;
- grd_buttonauthlist.fixedcellcheckbox(0,5) = true;
- grd_buttonauthlist.fixedcellcheckbox(0,6) = true;
- fInitialize();
- cmb_menuauthgrup.select(0);
- zbcfGetCodeList( new Array("R0061", "R0063", "Z0007", "Z0016", "R0058", "R0059", "R0062"),
- new Array("/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd", "/root/init/comcd"),
- true,
- new Array("cdnm", "cdnm", "cdnm", "cdnm", "cdnm", "cdnm", "cdnm"),
- new Array("asc", "asc", "asc", "asc", "asc", "asc", "asc")
- );
- ]]>
- </script>
- <submission id="TRZBC00101" method="post" replace="instance"/>
- <submission id="TRZSA20400" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authgrup"/>
- <submission id="TXZSA20400" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRZSA20401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authuser"/>
- <submission id="TRZSA20403" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_menu"/>
- <submission id="TXZSA20401" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRZSA20406" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authmenu"/>
- <submission id="TXZSA20402" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TXZSA21100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <submission id="TRZSA21100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list_authbutton"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/basiccodeweb/js/ZBC001.js"/>
- <script type="javascript" src="../../../com/authinfoweb/js/ZSA001.js"/>
- <script type="javascript">
- <![CDATA[
- /*
- 초기화 작업을 합니다.
- */
- function fInitialize(){
- model.removeNodeset("/root/main/list_authgrup/menuauthgruplist");
- model.removeNodeset("/root/main/list_authmenu/menuauthlist");
- model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
- model.refresh();
- btnAuthChkFlag = 0;
- }
- /*
- 버튼 컨트롤들을 클릭했을때 공통으로 타는 함수입니다.
- control : "search" 는 조회 버튼 클릭
- "init"은 신규 버튼 클릭
- "save"는 저장 버튼 클릭
- grid : 그리드 컨트롤을 넘겨줍니다.
- param : 기타 param을 넘겨줍니다.
- */
- function fClicked(control, grid, param){
- if ("search" == control){
- fSearchClick(grid, param);
- model.resetInstanceNode("/root/send");
- } else if ("init" == control){
- model.reset();
- } else if ("save" == control){
- fSaveClick(grid, param);
- } else if ("delete" == control){
- fDeleteClick(grid, param);
- }else {
- messageBox("처리를 수행","E002");
- }
- model.refresh();
- }
- /*
- 조회버튼 클릭 타는 함수입니다.
- submit을 날립니다.
- */
- function fSearchClick(grid,param){
- var RemNSet = "";
- if(param == "menuauthgrup"){
- RemNSet = "/root/main/list_authgrup/menuauthgruplist";
- } else if(param == "menuauthlist"){
- RemNSet = "/root/main/list_authmenu/menuauthlist";
- }
- model.removeNodeset(RemNSet);
- grid.rebuild();
- model.resetInstanceNode("/root/send");
- model.setValue("/root/send/searchitem", ipt_search_item.currentText);
- model.setValue("/root/send/flag", cmb_menuauthgrup.value);
-
- if(param == "menuauthgrup"){
- submit("TRZSA20400");
- } else if(param == "menu"){
- submit("TRZSA20402");
- } else if(param == "menugrupauthlist"){
- model.setValue("/root/send/menugrupauthcd", cmb_menugrupauthlist.value);
- model.setValue("/root/send/optmenuauthcd", opt_menuauthcd.value);
- submit("TRZSA20406");
- } else if(param == "menuauthlist"){
- model.setValue("/root/send/menugrupauthcd", cmb_menugrupauthlist.value);
- model.setValue("/root/send/optmenuauthcd", opt_menuauthcd.value);
- submit("TRZSA20406");
- } else {
- alert("Submit 실패입니다! 조회조건을 확인하세요!");
- }
- }
- /*
- 저장 버튼 클릭시 사는 함수입니다.
- submit을 날립니다.
- */
- function fSaveClick(grid, param) {
- // 버튼권한설정 추가
- for(var i = 1; i < grd_buttonauthlist.rows; i++) {
- var iFlag = 0;
- var iTypeR = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "r");
- var iTypeX = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "x");
- var iTypeP = fGetValue("/root/main/list_authbutton/buttonauthlist", i, "p");
- var iBtnAuth = iTypeR + iTypeX + iTypeP;
- if(iBtnAuth == null || iBtnAuth == "" || iBtnAuth == "0" || iBtnAuth == "00" || iBtnAuth == "000") {
- iFlag = 1;
- }
- fSetRowValue("/root/main/list_authbutton/buttonauthlist", "btnauthval", iBtnAuth, i);
- }
-
- // 버튼 리스트의 체크박스가 선택이 안된경우 처리
- if(iFlag == 1) {
- messageBox("버튼의 속성이 선택되지", "E007");
- } else if((iFlag == 0) && (btnAuthChkFlag == 0)) {
- messageBox("변경되지", "E007");
- } else if((iFlag == 0) && (btnAuthChkFlag == 1)) {
- model.setValue("/root/send/buttonauthlist", grd_buttonauthlist.getUpdateData());
- if(submit("TXZSA21100")) {
- grid.clearstatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- messageBox("저장이","I002");
- }
- }
- }
- function fDeleteClick(grid, param){
- if(param == "menuauthgrup"){
- grid.addStatus(grid.row,"delete");
- model.setValue("/root/send/menuauthgruplist", grid.getUpdateData());
- if ( submit("TXZSA20400") ) {
- grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- var jRow = grid.row;
- grid.deleteItem(jRow);
- }
- } else if(param == "menuitem"){
- grid.addStatus(grid.row,"delete");
- model.setValue("/root/send/menuitemlist", grid.getUpdateData());
- if ( submit("TXZSA20401") ) {
- grid.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- var jRow = grid.row;
- grid.deleteItem(jRow);
- }
- }
- }
-
- function fResetNode(node, destinationelement){
- model.setValue(node + "/" + destinationelement, "");
- alert(model.elementName("/root/main/item"));
- }
- /*
- model.getValue(); 를 함수로 만들었습니다.
- param1 : node는 grid의 xPath입니다.
- param2 : row는 grid에서 선택한 row값입니다.
- param3 : element는 getvalue할 해당 element 명입니다.
- 해당 getvalue값을 return 해줍니다.
- return 하지 않으면 해당값을 가져올 수 없습니다.
- */
- function fGetValue(node, row, element) {
- var rtnValue = model.getValue(node + "[" + row + "]/" + element);
- return rtnValue;
- }
- /*
- model.setValue();를 함수로 만들었습니다.
- param1 : node는 setvalue할 컨트롤의 xPath입니다.
- param2 : destinationelement는 setvalue할 element명 입니다.
- param3 : sourceelement는 setvalue할 값입니다.
- */
- function fSetValue(node, destinationelement, sourceelement) {
- model.setValue(node + "/" + destinationelement, sourceelement);
- }
- /**
- */
- function fSetRowValue(node, destinationelement, sourceelement, row) {
- model.makeValue(node + "[" + row + "]/" + destinationelement, sourceelement);
- }
-
- ]]>
- </script>
- </xhtml:head>
- <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; ">
- <group id="group1" style="left:0px; top:0px; width:1194px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:158px; height:14px; ">화면버튼권한 관리</caption>
- </group>
- <group id="grp_biz" scroll="auto" style="left:0px; top:36px; width:1195px; height:744px; ">
- <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; ">
- <col ref="levl" style="left:20px; top:23px; width:0px; height:23px; "/>
- <col ref="menuitemnm" style="left:20px; top:23px; width:285px; height:23px; "/>
- <col ref="menuitemcd" type="input" visibility="hidden"/>
- <col ref="upmenuitemcd" visibility="hidden"/>
- <col ref="scrncd" visibility="hidden"/>
- <col ref="menugrupcd" visibility="hidden"/>
- <col ref="menuauthcd" visibility="hidden"/>
- <col ref="scrnauth" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- //버튼리스트 초기화
- grd_buttonauthlist.fixedcellischeck(0,4) = false;
- grd_buttonauthlist.fixedcellischeck(0,5) = false;
- grd_buttonauthlist.fixedcellischeck(0,6) = false;
- var nodelist = instance1.selectNodes("/root/main/list_authbutton/buttonauthlist");
- if(nodelist.length > 0) {
- model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
- model.refresh();
- }
- var iRow = grd_menuauthlist.row;
- var iNode = "/root/main/list_authmenu/menuauthlist";
- var scrncd = fGetValue(iNode, iRow, "scrncd");
- model.setValue("/root/send/scrncd", scrncd);
- if(scrncd == null || scrncd == "" || scrncd == '-') {
- messageBox("화면이", "E014");
- } else if (scrncd) {
- submit("TRZSA21100");
- }
- ]]>
- </script>
- </datagrid>
- <group id="group2" style="left:5px; top:10px; width:340px; height:60px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:340px; height:60px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption1" class="search_name" style="left:15px; top:9px; width:117px; height:17px; ">메뉴권한그룹</caption>
- <button id="btn_search_menuauth" class="btn1_letter2" style="left:277px; top:19px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- fClicked("search", grd_menuauthgruplist, "menuauthgrup");
- ]]>
- </script>
- </button>
- <line id="line1" style="x1:266px; y1:8px; x2:266px; y2:51px; border-color:#ffe4bb; border-left-style:solid; "/>
- <input id="ipt_search_item" ref="/root/init/searchitem" class="input_s_essential" imemode="hangul" style="left:136px; top:34px; width:114px; height:19px; ">
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- inputEnterKey("btn_search_menuauth", "DOMActivate");
- ]]>
- </script>
- </input>
- <select1 id="cmb_menuauthgrup" ref="/root/init/flag" class="combo_search" appearance="minimal" style="left:136px; top:8px; width:114px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/flag">
- <label ref="lable"/>
- <value ref="value"/>
- </itemset>
- </choices>
- </select1>
- </group>
- <caption id="caption9" class="tit_2" style="left:5px; top:85px; width:111px; height:13px; vertical-align:middle; ">메뉴권한 그룹</caption>
- <line id="line12" class="line_1" style="x1:7px; y1:100px; x2:345px; y2:100px; "/>
- <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; ">
- <col ref="menuauthnm" type="input" _key="true"/>
- <col ref="menuauthcd" visibility="hidden"/>
- <script type="javascript" ev:event="ondblclick">
- <![CDATA[
- grd_menuauthgruplist.gridToInstance();
- var iRow = grd_menuauthgruplist.row;
- if("" != model.getValue("/root/main/list_authgrup/menuauthgruplist["+iRow+"]/menuauthnm")){
- grd_menuauthlist.explorerbar = "sortshow";
-
- var nodelist = instance1.selectNodes("/root/main/list_authbutton/buttonauthlist");
- if(nodelist.length > 0) {
- model.removeNodeset("/root/main/list_authbutton/buttonauthlist");
- model.refresh();
- }
- model.resetInstanceNode("/root/main/list_authmenu/menuauthlist");
- model.resetInstanceNode("/root/send");
-
- var iRow = grd_menuauthgruplist.row;
- var iNode = "/root/main/list_authgrup/menuauthgruplist"
-
- model.setValue("/root/main/item/menuauthnm", fGetValue(iNode, iRow, "menuauthnm"));
- model.setValue("/root/main/item/menuauthcd", fGetValue(iNode, iRow, "menuauthcd"));
- var iOptmenuauthcd = model.getValue("/root/main/item/menuauthcd");
-
- model.setValue("/root/send/optmenuauthcd", iOptmenuauthcd );
- submit("TRZSA20401");
- model.setValue("/root/init/menugrupauthcd", model.getValue("/root/main/list_authuser/menugrupauthlist[1]/menugrupcd"));
- cmb_menugrupauthlist.dispatch("xforms-select");
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption5" class="tit_2" style="left:349px; top:105px; width:124px; height:13px; ">메뉴권한 리스트</caption>
- <line id="line5" class="line_1" style="x1:350px; y1:120px; x2:760px; y2:120px; "/>
- <group id="group3" style="left:350px; top:61px; width:410px; height:35px; vertical-align:top; ">
- <shape id="roundrect3" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:410px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption10" class="search_name" style="left:15px; top:9px; width:164px; height:17px; ">메뉴권한 적용 메뉴그룹</caption>
- <select1 id="cmb_menugrupauthlist" ref="/root/init/menugrupauthcd" appearance="minimal" style="left:195px; top:9px; width:130px; height:19px; ">
- <choices>
- <itemset nodeset="/root/main/list_authuser/menugrupauthlist">
- <label ref="menugrupnm"/>
- <value ref="menugrupcd"/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- grd_menuauthlist.rebuild();
- fClicked("search", grd_menuauthlist, "menuauthlist");
- setTree(grd_menuauthlist, 1, 2, true);
- ]]>
- </script>
- </select1>
- </group>
- <group id="group4" style="left:350px; top:10px; width:844px; height:45px; vertical-align:top; ">
- <caption id="caption11" class="cell_1" style="left:0px; top:20px; width:135px; height:23px; ">메뉴권한 그룹(명/코드)</caption>
- <output id="opt_menuauthnm" ref="/root/main/item/menuauthnm" class="output_fix" style="left:138px; top:21px; width:135px; height:19px; "/>
- <output id="opt_menuauthcd" ref="/root/main/item/menuauthcd" class="output_fix" style="left:276px; top:21px; width:135px; height:19px; "/>
- <caption id="caption12" class="tit_2" style="left:0px; top:0px; width:169px; height:14px; ">선택 메뉴권한</caption>
- <line id="line7" class="line_1" style="x1:0px; y1:15px; x2:843px; y2:15px; "/>
- <line id="line8" class="line_3" style="x1:1px; y1:42px; x2:843px; y2:42px; "/>
- </group>
- <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; ">
- <col ref="scrncd" visibility="hidden"/>
- <col explorerbar="sortshow" ref="btnobjnm"/>
- <col explorerbar="sortshow" ref="btnobjid"/>
- <col checkvalue="R,0" ref="r" type="checkbox"/>
- <col checkvalue="X,0" ref="x" type="checkbox"/>
- <col checkvalue="P,0" ref="p" type="checkbox"/>
- <col ref="instcd" visibility="hidden"/>
- <col ref="btnauthval" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- // R,X,P 체크박스중 하나만 체크한다.
- var pSelectR = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r");
- var pSelectX = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x");
- var pSelectP = model.getValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p");
-
- if((grd_buttonauthlist.col == grd_buttonauthlist.colRef("r")) && pSelectR == "R") {
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x","0");
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p","0");
- } else if((grd_buttonauthlist.col==grd_buttonauthlist.colRef("x")) && pSelectX == "X") {
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r","0");
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/p","0");
- } else if((grd_buttonauthlist.col==grd_buttonauthlist.colRef("p")) && pSelectP == "P") {
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/r","0");
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + grd_buttonauthlist.row + "]/x","0");
- }
- btnAuthChkFlag = 1;
- model.refresh();
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- // 그리드 캡션 부분의 체크박스를 선택했을때 처리( row 0번째 체크박스)
- if(grd_buttonauthlist.row == "0") {
- if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("r")) {
- grd_buttonauthlist.fixedcellischeck(0,5) = false;
- grd_buttonauthlist.fixedcellischeck(0,6) = false;
- } else if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("x")) {
- grd_buttonauthlist.fixedcellischeck(0,4) = false;
- grd_buttonauthlist.fixedcellischeck(0,6) = false;
- } else if(grd_buttonauthlist.col==grd_buttonauthlist.colRef("p")) {
- grd_buttonauthlist.fixedcellischeck(0,4) = false;
- grd_buttonauthlist.fixedcellischeck(0,5) = false;
- }
- //그리드의 상태를 update로 함
- for(var i = 1; i < grd_buttonauthlist.rows; i++){
- grd_buttonauthlist.addStatus(i, "update");
- }
- btnAuthChkFlag = 1;
- }
- ]]>
- </script>
- </datagrid>
- <caption id="caption2" class="tit_2" style="left:765px; top:105px; width:165px; height:13px; ">버튼권한 리스트</caption>
- <line id="line2" class="line_1" style="x1:766px; y1:120px; x2:1194px; y2:120px; "/>
- <button id="btn_delete_buttonauth" class="btn2_letter2" style="left:1102px; top:100px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
-
- ]]>
- </script>
- </button>
- <button id="btn_save_buttonauth" class="btn5_letter2" style="left:1152px; top:100px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fClicked("save", grd_buttonauthlist, "buttonauthlist");
- btn_search_buttonauth.dispatch("DOMActivate");
- ]]>
- </script>
- </button>
- <button id="btn_add_buttonauth" class="btn2_letter2" style="left:1052px; top:100px; width:42px; height:19px; ">
- <caption>등록</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var iRow = grd_menuauthlist.row;
- var iNode = "/root/main/list_authmenu/menuauthlist";
- var scrncd = fGetValue(iNode, iRow, "scrncd");
- if(scrncd == null || scrncd == "" || scrncd == '-') {
- messageBox("화면이", "E014");
- } else if (scrncd) {
- open(scrncd);
- /* 등록버튼 클릭시
- if 버튼리스트에 첫 row가 없으면
- 버튼들을 모두 등록
- else if 조회된 값이 있으면
- 현재 리스트와 화면에서 얻어온 버튼 id를 비교하여 없는 것이 있으면 추가하고 추가한것만 update표시
- */
- var wndObj = getOpenWindow(scrncd);
- var btnCtrlInfo = wndObj.javascript.getBtnCtrlInfo();
- var jRows = grd_buttonauthlist.rows;
- var jNode = "/root/main/list_authbutton/buttonauthlist";
- var curBtnObjId = new Array();
- for(var i = 0; i < jRows; i++) {
- curBtnObjId[i] = model.getValue("/root/main/list_authbutton/buttonauthlist[" + (i+1) + "]/btnobjid");
- }
-
- // 그리드에 등록되어 있는 버튼이 하나도 없고, 화면에 버튼이 있으면
- // 화면의 버튼을 얻어와 그리드에 추가한다.
- if(curBtnObjId.length <= 1 && wndObj != null) {
- for(var i=0; i < btnCtrlInfo.length; i++) {
- grd_buttonauthlist.addRow(false, true);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjid", btnCtrlInfo[i].btnID);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjnm", btnCtrlInfo[i].btnTxt);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/scrncd", scrncd);
- }
- // 그리드에 등록되어 있는 버튼이 있다면
- // 그리드에 등록되어 있는 버튼과 현재화면의 버튼을 비교하여
- // 없는 버튼을 추가한다.
- } else if((curBtnObjId.length > 1) && ((curBtnObjId.length -1) == btnCtrlInfo.length)) {
- messageBox("이미 모든 버튼이 등록되어", "I010");
- } else if((curBtnObjId.length > 1) && ((curBtnObjId.length -1) < btnCtrlInfo.length)) {
- var j = (btnCtrlInfo.length - (curBtnObjId.length-1));
- alert("등록되지 않은 버튼이 " + j + "개 있습니다. 버튼을 추가합니다");
- for(var i=0; i<btnCtrlInfo.length; i++) {
- var pflag = model.getValue("/root/main/list_authbutton/buttonauthlist[btnobjid='" + btnCtrlInfo[i].btnID + "']/btnobjid");
- if(pflag == "" || pflag == null){
- grd_buttonauthlist.addRow(false, true);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjid", btnCtrlInfo[i].btnID);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/btnobjnm", btnCtrlInfo[i].btnTxt);
- model.makeValue("/root/main/list_authbutton/buttonauthlist[" + (grd_buttonauthlist.rows - 1) + "]/scrncd", scrncd);
- }
- }
- }
- model.refresh();
- }
- ]]>
- </script>
- </button>
- <button id="btn_search_buttonauth" class="btn2_letter2" style="left:1002px; top:100px; width:42pexx; height:19px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- btnAuthChkFlag = 0;
- grd_buttonauthlist.fixedcellischeck(0,4) = false;
- grd_buttonauthlist.fixedcellischeck(0,5) = false;
- grd_buttonauthlist.fixedcellischeck(0,6) = false;
- submit("TRZSA21100");
- ]]>
- </script>
- </button>
- </group>
- <group id="grp_btn" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line9" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|