123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="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>직종별 바로가기 등록</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <jobkindlist>
- <rows>
- <jobkindcd/>
- <itemnm/>
- <scrncd/>
- <seq/>
- <icontype/>
- <icontext/>
- <menuparam/>
- <iconcd/>
- <oldscrncd/>
- </rows>
- </jobkindlist>
- </main>
- <send>
- <jobkindcd/>
- <scrncd/>
- <jobkindlist/>
- <icontype>A</icontype>
- </send>
- <init>
- <R0061list>
- </R0061list>
- <Z0014list>
- </Z0014list>
- <iconlist>
- <rows>
- <checkyn/>
- <iconnm/>
- <iconcd/>
- <iconurl/>
- </rows>
- </iconlist>
- </init>
- </root>
- </instance>
- <bind id="bind1" ref="/root/main/jobkindlist/icontext" readonly="../icontype = 'I'"/>
- <submission id="TRZBC00101"/>
- <submission id="TRZUM01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/jobkindlist"/>
- <submission id="TRZUM01502" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/init/iconlist"/>
- <submission id="TXZUM01501" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/temp"/>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- zbcfGetCodeList( new Array("R0061", "Z0014"), new Array("/root/init/R0061list", "/root/init/Z0014list") );
- addComboItem( "cmb_jobkindcd" , "전체", "");
- model.removeNodeset("/root/main/jobkindlist/rows");
- submit("TRZUM01502");
- ]]>
- </script>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fCheckAuth();
- fSetGridBackImage(grd_iconlist, 1);
- grd_jobkindlist.dataHeight = 30;
- ]]>
- </script>
- </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">
- <![CDATA[
- function fSetGridBackImage(gridObj, imgCell){
- gridObj.dataHeight = 30;
- var gridNode = gridObj.attribute("nodeset");
-
- for( var i = gridObj.fixedRows ; i < gridObj.Rows ; i++ ) {
- var iconurl = "../../../com/hismainweb/images/" + model.getValue(gridNode+"["+i+"]/iconcd") + ".gif";
-
- gridObj.cellStyle("background-image", i, imgCell) = iconurl;
- gridObj.cellStyle("background-position", i, imgCell) = "center";
- }
- }
-
- function fCheckAuth(){
- var authX = !checkAuth('X');
- btn_addrow.disabled = authX;
- btn_delete.disabled = authX;
- btn_save.disabled = authX;
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1195;2,784;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group3" scroll="auto" style="left:0px; top:0px; width:705px; height:750px; ">
- <group id="group2" style="left:0px; top:0px; width:704px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:704px; height:35px; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:8px; width:86px; height:17px; ">직종코드 :</caption>
- <button id="btn_search" class="btn1_letter2" style="left:626px; top:7px; width:56px; height:22px; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRZUM01501");
- fSetGridBackImage(grd_jobkindlist, 6);
- ]]>
- </script>
- </button>
- <line id="line13" class="line_4" style="x1:610px; y1:7px; x2:610px; y2:29px; "/>
- <select1 id="cmb_jobkindcd" ref="/root/send/jobkindcd" class="combo_search" appearance="minimal" style="left:101px; top:8px; width:115px; height:19px; ">
- <choices>
- <itemset nodeset="/root/init/R0061list/R0061">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </select1>
- <input id="input3" ref="/root/send/scrncd" class="input_search" style="left:440px; top:8px; width:100px; height:19px; "/>
- <caption id="caption3" class="search_name" style="left:351px; top:10px; width:86px; height:17px; ">화면코드 :</caption>
- </group>
- <caption id="caption1" class="tit_2" style="left:5px; top:45px; width:113px; height:14px; ">직종별 바로가기</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:60px; x2:704px; y2:60px; "/>
- <datagrid id="grd_jobkindlist" nodeset="/root/main/jobkindlist/rows" caption="직종코드^바로가기명^화면ID^순서^표시형태^^파라미터^iconcd" colsep="^" colwidth="100, 130, 90, 40, 60, 40, 100, 75, 100" dataheight="23" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:65px; width:598px; height:685px; ">
- <col disabled="true" ref="jobkindcd" type="combo" _key="true">
- <choices>
- <itemset nodeset="/root/init/R0061list/R0061">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col autonext="false" imemode="hangul" ref="itemnm" type="input" maxlength="10"/>
- <col autonext="false" imemode="disabled" ref="scrncd" type="input" maxlength="10" _chartype="upper"/>
- <col ref="seq" type="input"/>
- <col class="text_center" ref="icontype" type="combo">
- <choices>
- <itemset nodeset="/root/init/Z0014list/Z0014">
- <label ref="cdnm"/>
- <value ref="cdid"/>
- </itemset>
- </choices>
- </col>
- <col imemode="hangul" ref="icontext" type="input" style="text-align:center; "/>
- <col ref="menuparam" type="input"/>
- <col ref="iconcd" visibility="hidden"/>
- <col ref="oldscrncd" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if(grd_jobkindlist.col == 1){ // 직종선택
- grd_jobkindlist.col = 2;
- grd_jobkindlist.dispatch("onentercell");
- // 불필요한 코드 삭제 - 김기호
- //grd_jobkindlist.editCell();
- }else if(grd_jobkindlist.col == 5){ // 아이콘선택
- //표시형태 선택시 처리
- var icontype = model.getValue("/root/main/jobkindlist/rows["+grd_jobkindlist.row+"]/icontype");
-
- if(icontype == "I"){
- grd_iconlist.visible = true;
- model.setFocus("grd_iconlist");
- }else{
- grd_iconlist.visible = false;
- grd_jobkindlist.col = 6;
- grd_jobkindlist.dispatch("onentercell");
- // 불필요한 코드 삭제 - 김기호
- //grd_jobkindlist.editCell();
- }
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onendedit">
- <![CDATA[
- //iconText 입력시
- if( grd_jobkindlist.col == 6 ){
- var row = grd_jobkindlist.row;
-
- var iconText = model.getValue("/root/main/jobkindlist/rows[" + row + "]/icontext");
- if (iconText.getByteLength() > 8) {
- messageBox("한글 4글자, 영문 8글자를 초과", "E001");
- grd_jobkindlist.editCell();
- return;
- }
-
- model.setValue("/root/main/jobkindlist/rows["+row+"]/iconcd", "IDZUM10000");
-
- grd_jobkindlist.cellStyle("background-image", row, 6) = "../../../com/hismainweb/images/IDZUM10000.gif";
- grd_jobkindlist.cellStyle("background-position", row, 6) = "center";
- }
-
- // 김기호 - 버그삭제
- //grd_jobkindlist.col = grd_jobkindlist.col + 1;
- //grd_jobkindlist.dispatch("onentercell");
- //grd_jobkindlist.editCell();
- ]]>
- </script>
- <script type="javascript" ev:event="onentercell">
- <![CDATA[
- //화면아이디 입력
- if( grd_jobkindlist.col == 3 ){
- modal("SPZSA20500");
- var row = grd_jobkindlist.row;
- model.setValue("/root/main/jobkindlist/rows["+row+"]/scrncd", getParameter("SPZSA20500_").split("|")[0]);
- grd_jobkindlist.addStatus(row, "update");
- model.refresh();
- }
- ]]>
- </script>
- <script type="javascript" ev:event="onkeypress">
- <![CDATA[
- // enter 를 통해서 입력을 마쳤을 경우만 화면ID 선택창 오픈 - 김기호
- if (grd_jobkindlist.col == 2 && event.keyCode == 13) {
- grd_jobkindlist.col = grd_jobkindlist.col + 1;
- grd_jobkindlist.dispatch("onentercell");
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_addrow" class="btn2_letter3" style="left:607px; top:40px; width:53px; height:19px; ">
- <caption>행추가</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_jobkindlist.addRow();
- grd_jobkindlist.isReadOnly(grd_jobkindlist.row, 1) = false;
- grd_jobkindlist.col = 1;
- grd_jobkindlist.dispatch("onentercell");
- ]]>
- </script>
- </button>
- <datagrid id="grd_iconlist" nodeset="/root/init/iconlist/rows" visibility="hidden" caption="선택^아이콘^iconcd^iconurl^iconurl" colsep="^" colwidth="40, 45, 50, 100" mergecellsfixedrows="bycolrec" rowsep="|" style="left:601px; top:65px; width:103px; height:685px; ">
- <col ref="checkyn" type="radio"/>
- <col ref="iconnm"/>
- <col ref="iconcd" visibility="hidden"/>
- <col ref="iconurl" visibility="hidden"/>
- <script type="javascript" ev:event="xforms-select">
- <![CDATA[
- if( grd_iconlist.col == 0){
- var row = grd_jobkindlist.row;
- var iconcd = model.getValue("/root/init/iconlist/rows[" +grd_iconlist.row+"]/iconcd");
- var iconurl = model.getValue("/root/init/iconlist/rows[" +grd_iconlist.row+"]/iconurl");
-
- model.setValue("/root/main/jobkindlist/rows["+row+"]/icontext", "");
- model.setValue("/root/main/jobkindlist/rows["+row+"]/iconcd", iconcd);
-
- grd_jobkindlist.cellStyle("background-image", row, 6) = "../../../"+ iconurl;
- grd_jobkindlist.cellStyle("background-position", row, 6) = "center";
-
- model.refresh();
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_delete" class="btn2_letter2" style="left:662px; top:40px; width:42px; height:19px; ">
- <caption>삭제</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var row = grd_jobkindlist.row;
- grd_jobkindlist.deleteRow(row);
- ]]>
- </script>
- </button>
- </group>
- <group id="group1" scroll="auto" style="left:0px; top:750px; width:705px; height:27px; ">
- <button id="btn_save" class="btn4_letter2" style="left:648px; top:5px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var updtdata = getGridUpdateData(grd_jobkindlist);
- if (updtdata == "") {
- messageBox("변경된 데이터가","I004");
- return;
- }
-
- var jobKindCd = "";
- var itemNm = "";
- var scrnCd = "";
- var seq = "";
- var iconType = "";
- var iconText = "";
- var menuParam = "";
- var iconCd = "";
-
- for( i = grd_jobkindlist.fixedRows; i < grd_jobkindlist.rows ; i++ ) {
- var status = grd_jobkindlist.rowStatus(i);
- if(status != 0){
- jobKindCd = grd_jobkindlist.valueMatrix(i,1);
- itemNm = grd_jobkindlist.valueMatrix(i,2);
- scrnCd = grd_jobkindlist.valueMatrix(i,3);
- seq = grd_jobkindlist.valueMatrix(i,4);
- iconType = grd_jobkindlist.valueMatrix(i,5);
- iconText = grd_jobkindlist.valueMatrix(i,6);
- menuParam = grd_jobkindlist.valueMatrix(i,7);
- iconCd = grd_jobkindlist.valueMatrix(i,8);
-
- if(jobKindCd == ""){
- messageBox("직종코드를","C002");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 1;
- grd_jobkindlist.dispatch("onentercell");
- return;
- }
-
- if(itemNm == ""){
- messageBox("바로가기명을","C001");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 2;
- grd_jobkindlist.dispatch("onentercell");
- return;
- }
-
- if(scrnCd == ""){
- messageBox("연결할 화면을","C002");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 3;
- grd_jobkindlist.dispatch("onentercell");
- return;
- }
-
- if(seq == ""){
- messageBox("표시순서를","C001");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 4;
- grd_jobkindlist.dispatch("onentercell");
- return;
- }
-
- if(iconType == ""){
- messageBox("표시형태를","C002");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 5;
- grd_jobkindlist.dispatch("onentercell");
- return;
- }
-
- if(iconType == "T" && iconText == "" ){
- messageBox("표시할 텍스트를","C001");
- grd_jobkindlist.row = i;
- grd_jobkindlist.col = 6;
- grd_jobkindlist.dispatch("onentercell");
- grd_jobkindlist.editCell();
- return;
- }
- if(iconType == "I" && (iconCd == "" || iconCd == "IDZUM10000")){
- messageBox("표시할 아이콘을","C002");
- grd_jobkindlist.row = i;
- grd_iconlist.visible = true;
- model.setFocus("grd_iconlist");
- return;
- }
-
- if(menuParam != ""){
- if((isSearchString(menuParam, "<")
- || isSearchString(menuParam, ">")
- || isSearchString(menuParam, "&")
- || isSearchString(menuParam, "'")
- || isSearchString(menuParam, '"') )
- || (menuParam.split("|").length >1 )){
- messageBox("파라미터로 사용", "E001", "(<, >, &, "+ "'"+", "+'"'+",|)");
- return;
- }
- }
- }
-
- //insert시
- if(status == 1){
- model.setValue("/root/main/jobkindlist/rows["+i+"]/oldscrncd", scrncd);
- }
- }
-
- // alert("grid update data = " + grd_shortcutlist.getUpdateData());
- model.setValue("/root/send/jobkindlist", updtdata);
-
- if ( submit("TXZUM01501") ) {
- grd_jobkindlist.clearStatus(); // submit() 성공하면 그리드의 i,u,d 상태 제거
- }
- ]]>
- </script>
- </button>
- <line id="line32" class="line_6" style="x1:0px; y1:0px; x2:704px; y2:0px; "/>
- </group>
- </xhtml:body>
- </xhtml:html>
|