/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì ¾à¼ÓSET°ü¸® ( SMMMB00600_¾à¼ÓSET°ü¸®.xrw - JScript ) - Version : 1) : Ver.1.00.01 - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var sCOMNINDX = "/root/main/indxlist/item"; var sCOMNINDX_HIDDEN = "/root/temp/indxlist/item"; var sMOUSE_CLK_STATUS; //¸¶¿ì½º Ŭ¸¯ Á¿ì¹öư ±¸ºÐ /** * @desc : ¸¶¿ì½º ¿À¸¥ÂÊ ¹öư ÆË¾÷â * @ * @param : * @return : * @--------------------------------------------------- */ /** function fMouseRghtBtnPopup(){ if(event.button == 3){ if(trv_comnindx.isCell(event.target) && trv_comnindx.focusIndex > -1) window.setPopupMenu(true, "/root/temp/menu/menu", "label", "func", false); //ÆË¾÷â ¼ÂÆÃ }else{ window.setPopupMenu(false); } } */ function fMouseRghtBtnPopup(){ if(event.button == 3){ trv_comnindx.selected = true; if(trv_comnindx.isCell(event.target) && trv_comnindx.focusIndex > -1) window.setPopupMenu(true, "/root/temp/menu/menu", "label", "func", false); //ÆË¾÷â ¼ÂÆÃ }else{ window.setPopupMenu(false); } } /** * @desc : »õÆú´õ Ãß°¡ * @ * @param : * @return : * @--------------------------------------------------- */ function fAddPrmsDiagSet(){ var item = trv_comnindx.item(trv_comnindx.selectedIndex); var rowPos = item.index + 1; fSetPrmsDiagInfo(rowPos, "i"); model.setValue(sCOMNINDX_HIDDEN + "/status", "i"); model.refresh(); fShowWndIptBox(); } /** * @desc : Æú´õ »èÁ¦ * @ * @param : * @return : * @--------------------------------------------------- */ function fDelPrmsDiagSet(){ var item = trv_comnindx.item(trv_comnindx.selectedIndex); var rowPos = item.index + 1; if(fSetPrmsDiagInfo(rowPos, "d")!= -1){ fSavePrmsDiagSet(); } } /** * @desc : Æú´õ ¼öÁ¤ * @ * @param : * @return : * @--------------------------------------------------- */ function fUpdtPrmsDiagSet(){ var item = trv_comnindx.item(trv_comnindx.selectedIndex); var rowPos = item.index + 1; if(fSetPrmsDiagInfo(rowPos, "u")!=-1){ fShowWndIptBox(); } } /** * @desc : ¾à¼ÓÁø´Ü SETÀúÀå * @ * @param : * @return : * @--------------------------------------------------- */ function fSavePrmsDiagSet(){ var indxnm = model.getValue("/root/main/iptbox/indxnm"); model.setValue(sCOMNINDX_HIDDEN + "/indxnm", indxnm); model.refresh(); model.copyNode("/root/send/savedata", sCOMNINDX_HIDDEN); alert(model.getValue(sCOMNINDX_HIDDEN + "/indxnm")); // Æú´õ 'N' / »ó¿ë±¸ 'Y' ±¸ºÐ model.makeValue("/root/send/savedata/linkflag","N"); // °³ÀÎ 'p' ,°ú 'D', Àüü 'T' ±¸ºÐ model.makeValue("/root/send/savedata/deptflag",model.getValue("/root/temp/deptflag")); submit("TXMRF02402"); fClrTreeViweSelect(); } /** * @desc : ¾à¼ÓÁø´Ü°ü¸® Æú´õ¸íÀ» ÀÔ·ÂÇÒ InputBox¸¦ º¸¿©ÁÜ. * @ * @param : * @return : * @--------------------------------------------------- */ function fShowWndIptBox(){ group1.attribute("top") = event.clientY; group1.attribute("height") = 55; model.setFocus("ipt_indxnm"); model.refresh(); } /** * @desc : ¾à¼ÓÁø´Ü SETÁ¤º¸ SETTING * @ * @param : * @return : * @--------------------------------------------------- */ function fSetPrmsDiagInfo(rowpos, status){ var itemindxseq = model.getValue(sCOMNINDX + "[" + rowpos + "]/itemindxseq"); if(status == "u" && itemindxseq == 1){ messageBox("¼±ÅÃÇÑ Æú´õ´Â ¼öÁ¤", "E001"); return -1; }else if(status == "d" && itemindxseq == 1){ messageBox("¼±ÅÃÇÑ Æú´õ´Â »èÁ¦", "E001"); return -1; } var depth = model.getValue(sCOMNINDX + "[" + rowpos + "]/depth"); var supitemindxseq = model.getValue(sCOMNINDX + "[" + rowpos + "]/supitemindxseq"); var indxnm = model.getValue(sCOMNINDX + "[" + rowpos + "]/indxnm"); var sortno = model.getValue(sCOMNINDX + "[" + rowpos + "]/sortno"); //alert(depth + "," + supitemindxseq + "," + setkindcd + "," + setclscd + "," + settrgtcd + "," + settypecd + "," + indxnm + "," + sortno); model.setValue(sCOMNINDX_HIDDEN + "/depth" , depth); model.setValue(sCOMNINDX_HIDDEN + "/itemindxseq" , itemindxseq); model.setValue(sCOMNINDX_HIDDEN + "/status" , status); if(status == "i"){ model.setValue(sCOMNINDX_HIDDEN + "/supitemindxseq" , itemindxseq); }else{ model.setValue(sCOMNINDX_HIDDEN + "/supitemindxseq" , supitemindxseq); } if(sortno == "") sortno = 1000; model.setValue(sCOMNINDX_HIDDEN + "/sortno" , sortno); model.refresh(); } /** * @desc : ¾à¼ÓÁø´ÜSET Drag * @ * @param : * @return : * @--------------------------------------------------- */ function fPrmsDiagSetDrag(){ var item = trv_comnindx.item(trv_comnindx.selectedIndex); var rowpos = item.index + 1; fSetPrmsDiagInfo(rowpos, "u"); var indxnm = model.getValue(sCOMNINDX + "[" + rowpos + "]/indxnm"); model.setValue("/root/main/iptbox/indxnm", indxnm); model.refresh(); } /** * @desc : ¾à¼ÓÁø´ÜSET Drop * @ * @param : * @return : * @--------------------------------------------------- */ function fPrmsDiagSetDrop(){ var rowpos = trv_comnindx.mouseRow + 1; var depth = model.getValue(sCOMNINDX + "[" + rowpos + "]/depth"); var itemindxseq = model.getValue(sCOMNINDX + "[" + rowpos + "]/itemindxseq"); var supitemindxseq = model.getValue(sCOMNINDX + "[" + rowpos + "]/supitemindxseq"); var cmpdepth = model.getValue(sCOMNINDX_HIDDEN + "/depth"); var cmpitemindxseq = model.getValue(sCOMNINDX_HIDDEN + "/itemindxseq"); var cmpsupitemindxseq = model.getValue(sCOMNINDX_HIDDEN + "/supitemindxseq"); if(itemindxseq == cmpitemindxseq){ //messageBox("µ¿ÀÏÇÑ À§Ä¡·Î À̵¿", "E001"); trv_comnindx.item(trv_comnindx.mouseRow).attribute("background-color") = "#ffffff"; trv_comnindx.item(trv_comnindx.mouseRow).attribute("text-decoration") = ""; return; }else if(itemindxseq == cmpsupitemindxseq){ trv_comnindx.item(trv_comnindx.mouseRow).attribute("background-color") = "#ffffff"; trv_comnindx.item(trv_comnindx.mouseRow).attribute("text-decoration") = ""; messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); return; } //À̵¿ÇÏ´Â SETÆú´õÀÇ depth°¡ µµÂøÇÏ´Â °÷º¸´Ù ³·Àº ·¹º§ÀÏ °æ¿ì, //ÀÚ½ÅÀÇ child node ¾Æ·¡·Î À̵¿ÇÏ´Â °ÍÀ» ¹æÁöÇÔ. if(cmpdepth < depth){ var rootdepth; var rootitemindxseq; while(cmpdepth != rootdepth){ rootdepth = model.getValue(sCOMNINDX + "[" + rowpos + "]/depth"); rootitemindxseq = model.getValue(sCOMNINDX + "[" + rowpos + "]/itemindxseq"); rowpos--; } if(rootitemindxseq == cmpitemindxseq){ messageBox("ÁöÁ¤µÈ À§Ä¡·Î À̵¿", "E001"); return; } } model.setValue(sCOMNINDX_HIDDEN + "/supitemindxseq" , itemindxseq); model.refresh(); fSavePrmsDiagSet(); } /** * @desc : ¾à¼ÓSET»ó¼¼ Á¶È¸ * @ * @param : * @return : * @--------------------------------------------------- */ function fReqPrmsDetlSet(){ var item = trv_comnindx.item(trv_comnindx.selectedIndex); var rowpos = item.index + 1; fSetPrmsDiagInfo(rowpos); var itemindxseq = model.getValue(sCOMNINDX_HIDDEN + "/itemindxseq"); var settypecd = model.getValue(sCOMNINDX_HIDDEN + "/settypecd"); if(itemindxseq == 1){ return; } model.makeValue("/root/send/reqdata/itemindxseq", itemindxseq); model.makeValue("/root/send/reqdata/settypecd", settypecd); model.makeValue("/root/temp/indxfocus",rowpos); // iviewer1.window.javascript.fReqPrmsDetlSet(); //YÀÌ¸é »ó¿ë±¸ Á¤º¸ Á¶È¸ var linkflag = model.getValue("/root/main/indxlist/item["+ rowpos +"]/linkflag"); //model.refresh(); if(linkflag=="Y"){ model.makeValue("/root/send/reqdata/comnseq",model.getValue("/root/main/indxlist/item["+ rowpos +"]/comnseq")); model.makeValue("/root/send/reqdata/comnflag",model.getValue("/root/temp/deptflag")); model.makeValue("/root/send/reqdata/listflag","comninfo"); submit("TRMRF02403"); } //alert(rowpos); //model.getValue("/root/temp/indxfocus"); // model.setValue("/root/main/indxlist/item["+ rowpos +"]/indxnm",model.getValue("/root/main/indxlist/item["+ rowpos +"]/indxnm")); // model.setfocus("trv_comnindx"); model.refresh(); //var ab =model.getfocus(); // alert(ab); } /** * @desc : Mouse Drag Drop * @ * @param : * @return : void * @authur : ¿ÀÁöÈÆ 2007. 4. 24 * @--------------------------------------------------- */ function fOndrop(){ var rowpos = trv_comnindx.mouseRow + 1; var depth = model.getValue(sCOMNINDX + "[" + rowpos + "]/depth"); var indxnm = model.getValue(sCOMNINDX + "[" + rowpos + "]/indxnm"); var x = event.clientX; var maxposX = 24 + 16 * (depth - 1) + ( 13 * indxnm.length); var minposX = 24 + 16 * (depth - 1); if(maxposX > x){ fPrmsDiagSetDrop(); }else{ return; } } /** * @desc : Mouse Drag Over * @ * @param : * @return : void * @authur : ¿ÀÁöÈÆ 2007. 4. 24 * @--------------------------------------------------- */ function fMouseOver(){ var rowpos = trv_comnindx.mouseRow + 1; var depth = model.getValue(sCOMNINDX + "[" + rowpos + "]/depth"); var indxnm = model.getValue(sCOMNINDX + "[" + rowpos + "]/indxnm"); var x = event.clientX; var maxposX = 24 + 16 * (depth - 1) + ( 10 * indxnm.length); var minposX = 24 + 16 * (depth - 1); if(maxposX > x){ for ( var i = 0; i < trv_comnindx.length; i++ ) { trv_comnindx.item(i).attribute("background-color") = "#ffffff"; trv_comnindx.item(i).attribute("text-decoration") = ""; } trv_comnindx.item(trv_comnindx.mouseRow).attribute("background-color") = "#ece1ec"; trv_comnindx.item(trv_comnindx.mouseRow).attribute("text-decoration") = "underline"; } } /** * @desc : Æú´õ¸í °Ë»öÇÒ °æ¿ì °Ë»öÇÑ À§Ä¡·Î focus¸¦ À̵¿ÇÑ´Ù. * @ * @param : * @return : void * @authur : ¿ÀÁöÈÆ 2007. 4. 24 * @--------------------------------------------------- */ function fSrchDiagSetNM(){ var sFolderNM = model.getValue("/root/main/cond/foldernm"); for(var i=0; i x){ if( trv_comnindx.selectedIndex != treeObj.mouseRow ) { for ( var i = 0; i < treeObj.length; i++ ) { treeObj.item(i).attribute("background-color") = "#ffffff"; } treeObj.item(treeObj.mouseRow).attribute("background-color") = "#ece1ec"; } } }