/* - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì Æú´õº° ¼ú½Ä¾î ( SMMRE00600_Æú´õº°¼ú½Ä¾î°ü¸®.xrw - JScript ) - Version : 1) : Ver.1.00.01 - Author : ÃÖ¿øµ· (2010.12.01~ - ¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì¢Ì */ var sSELFOLDINFO_PATH = "/root/main/selinfo/foldinfo" var sSELFOLDLIST_PATH = "/root/main/selinfo/foldinfo/foldlist" var sSELWORDINFO_PATH = "/root/main/selinfo/wordinfo" var sSELWORDLIST_PATH = "/root/main/selinfo/wordinfo/wordlist" var sSELFOLDWORDINFO_PATH = "/root/main/selinfo/foldwordinfo" var sSELFOLDWORDLIST_PATH = "/root/main/selinfo/foldwordinfo/foldwordlist" var sSELFOLDWORDINFO_ORG_PATH = "/root/data/selinfo/foldwordinfo" var sSELFOLDWORDLIST_ORG_PATH = "/root/data/selinfo/foldwordinfo/foldwordlist" var sMODINFO_PATH = "/root/data/modinfo" var sMODFOLDWORDINFO_PATH = "/root/data/modinfo/foldwordinfo" var sDELINFO_PATH = "/root/data/delinfo" var sDELFOLDWORDINFO_PATH = "/root/data/delinfo/foldwordinfo" // PK COLUMNS var aPKCOLID_MASTLIST = new Array( "instcd" , "wmid" , "wrpid" ); // treeindex //var li_treeindex = 0; /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : ÃʱâÈ­ * @--------------------------------------------------- */ function fInitialize() { // fGetwordinfo(); // ¼ú½Ä¾î¸¦ Á¶È¸ÇÑ´Ù. // // grd_foldwordlist.removeRow(true); // model.refresh(); //debugger; fGetfoldinfo(); // Æú´õ¸¦ Á¶È¸ÇÑ´Ù. tr_fold.refresh(); // combo2.dispatch("xforms-value-changed"); } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : Æú´õ¸¦ Á¶È¸ * @--------------------------------------------------- */ function fGetfoldinfo() { // ÃʱâÈ­ START //mainlist ÃʱâÈ­ model.removenode(sSELFOLDINFO_PATH); model.makeNode(sSELFOLDINFO_PATH); //send parameter ÃʱâÈ­ model.removeNodeset("/root/send/foldinfo/reqdata"); model.makeNode("/root/send/foldinfo/reqdata"); model.copyNode("/root/send/foldinfo/reqdata", "/root/main/cond/foldinfo"); // ÃʱâÈ­ END //submit È£Ãâ if(!submit("TRMRE00501")){ messageBox("Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.", "E999"); return; } // Æú´õº° ¼ú½Ä¾î ÃʱâÈ­ model.removenode(sSELFOLDWORDINFO_PATH); model.makeNode(sSELFOLDWORDINFO_PATH); setActiveInit(); // ÃʱâÈ­ (Á¶È¸, ÀúÀå ÈÄ) model.setValue("/root/main/cond/foldwordinfo/wmid", ""); model.refresh(); } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : ¼ú½Ä¾î¸¦ Á¶È¸ * @--------------------------------------------------- */ function fGetwordinfo() { // ÃʱâÈ­ START model.removenode(sSELWORDINFO_PATH); model.makeNode(sSELWORDINFO_PATH); //send parameter ÃʱâÈ­ model.removeNodeset("/root/send/wordinfo/reqdata"); model.makeNode("/root/send/wordinfo/reqdata"); model.copyNode("/root/send/wordinfo/reqdata", "/root/main/cond/wordinfo"); // ÃʱâÈ­ END //submit È£Ãâ if(!submit("TRMRE00201")){ messageBox("Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.", "E999"); return; } } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : Æú´õº° ¼ú½Ä¾î¸¦ Á¶È¸ * @--------------------------------------------------- */ function fGetfoldwordinfo() { // ÀÚ½ÄÆúµå°¡ ÀÖÀ¸¸é Á¶È¸¾ÈµÊ. if ( tr_fold.value == "" || instance1.selectSingleNode(sSELFOLDLIST_PATH + "[pwmid='" + tr_fold.value + "']") != null) { return; } // ÃʱâÈ­ START model.removenode(sSELFOLDWORDINFO_PATH); model.makeNode(sSELFOLDWORDINFO_PATH); //send parameter ÃʱâÈ­ model.removeNodeset("/root/send/foldwordinfo/reqdata"); model.makeNode("/root/send/foldwordinfo/reqdata"); model.copyNode("/root/send/foldwordinfo/reqdata", "/root/main/cond/foldwordinfo"); // ÃʱâÈ­ END //submit È£Ãâ if(!submit("TRMRE00601")){ messageBox("Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.", "E999"); return; } setActiveInit(); // ÃʱâÈ­ (Á¶È¸, ÀúÀå ÈÄ) } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : ÃʱâÈ­ (Á¶È¸, ÀúÀå ÈÄ) * @--------------------------------------------------- */ function setActiveInit() { createTempNode(); // Temp ³ëµå¸¦ »ý¼ºÇÑ´Ù. model.removeNodeset(sMODFOLDWORDINFO_PATH); model.makeNode(sMODFOLDWORDINFO_PATH); model.removeNodeset(sDELFOLDWORDINFO_PATH); model.makeNode(sDELFOLDWORDINFO_PATH); } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : Æú´õº° ¼ú½Ä¾î ÀúÀå * @--------------------------------------------------- */ function fClkBtnfoldwordSave() { if(chkMsetIdenNode(aPKCOLID_MASTLIST, sSELFOLDWORDLIST_ORG_PATH, sSELFOLDWORDINFO_PATH, sDELFOLDWORDINFO_PATH, sMODFOLDWORDINFO_PATH, false, "insertwmid", null, "m", "i")) // µ¿ÀÏ¿©ºÎüũ { messageBox("ÀúÀåÇÒ µ¥ÀÌÅͰ¡", "I004"); return; } //send parameter ÃʱâÈ­ model.removeNodeset("/root/send/foldwordinfo/reqdata"); model.makeNode("/root/send/foldwordinfo/reqdata"); model.copyNode("/root/send/foldwordinfo/reqdata", "/root/main/cond/foldwordinfo"); model.removeNodeset("/root/send/foldwordinfo/savedata"); var modfoldwordinfo = instance1.selectSingleNode(sMODFOLDWORDINFO_PATH); var delfoldwordinfo = instance1.selectSingleNode(sDELFOLDWORDINFO_PATH); if ( modfoldwordinfo != null && modfoldwordinfo.childNodes.length > 0) // Ãß°¡, ¼öÁ¤Á¤º¸¸¦ save¿¡ µî·ÏÇÑ´Ù. { model.makeNode ("/root/send/foldwordinfo/savedata/modlist"); model.makeValue("/root/send/foldwordinfo/savedata/modlist", getNodeListCSV(modfoldwordinfo.childNodes)); } if ( delfoldwordinfo != null && delfoldwordinfo.childNodes.length > 0) // »èÁ¦Á¤º¸¸¦ save¿¡ µî·ÏÇÑ´Ù. { model.makeNode ("/root/send/foldwordinfo/savedata/dellist"); model.makeValue("/root/send/foldwordinfo/savedata/dellist", getNodeListCSV(delfoldwordinfo.childNodes)); } if(!submit("TXMRE00601")){ messageBox("ÀúÀåÀ» ½ÇÆÐÇÏ¿´½À´Ï´Ù.", "E999"); return; } setActiveInit(); // ÃʱâÈ­ (Á¶È¸, ÀúÀå ÈÄ) model.refresh(); } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : Temp ³ëµå¸¦ »ý¼ºÇÑ´Ù. * @--------------------------------------------------- */ function createTempNode() { model.removeNodeset(sSELFOLDWORDINFO_ORG_PATH); model.makeNode(sSELFOLDWORDINFO_ORG_PATH); model.copyNode(sSELFOLDWORDINFO_ORG_PATH, sSELFOLDWORDINFO_PATH); } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : ¼ú½Ä¾î ÆË¾÷¸Þ´º 'ÀÔ·Â' Ŭ¸¯ ½Ã Æú´õº° ¼ú½Ä¿¡ »ðÀÔ * @--------------------------------------------------- */ function InsertrowFoldWord() { if (tr_fold.selectedindex == -1) { messageBox("Æú´õ¸¦ ¼±ÅÃÇϼ¼¿ä!", "E999"); return; } if (instance1.selectSingleNode(sSELFOLDLIST_PATH + "[pwmid='" + tr_fold.value + "']") != null) { messageBox("Àڽİ¡ ÀÖÀ¸·Î Ãß°¡ÇÒ ¼ö ¾ø½À´Ï´Ù. ÀÚ½Ä Æú´õ¸¦ ¼±ÅÃÇϼ¼¿ä!", "E999"); return; } var lb_endyn = false; var li_currentrow = grd_foldwordlist.row; var li_rows = grd_foldwordlist.rows; var li_row = grd_foldwordlist.rows - 1; var cnt = 0; // seq Áõ°¡º¯¼ö if (li_currentrow > 0) { li_row = li_currentrow; } for(var i=0; i 0) { if (i == grd_wordlist.selectedRows - 1) // ¸¶Áö¸·¿¡ refresh { lb_endyn = true; } var ls_wrpid = grd_wordlist.valueMatrix(grd_wordlist.selectedRow(i), grd_wordlist.colRef("wrpid")); if ( li_rows < 2 || ( li_rows > 1 && grd_foldwordlist.findRow(ls_wrpid, 0, grd_foldwordlist.colRef("wrpid"), false, true) < 0)) // µ¿ÀÏÇÑ Á¤º¸°¡ ÀÖ´Ù¸é Ãß°¡¿¡¼­ Á¦¿Ü { if (li_currentrow > 0) { grd_foldwordlist.insertRow(li_row, "below", false, true); } else { grd_foldwordlist.addRow(false); } ++li_row; grd_foldwordlist.valueMatrix(li_row, grd_foldwordlist.colRef("wmid")) = tr_fold.value; grd_foldwordlist.valueMatrix(li_row, grd_foldwordlist.colRef("wrpid")) = grd_wordlist.valueMatrix(grd_wordlist.selectedRow(i), grd_wordlist.colRef("wrpid")); grd_foldwordlist.valueMatrix(li_row, grd_foldwordlist.colRef("content")) = grd_wordlist.valueMatrix(grd_wordlist.selectedRow(i), grd_wordlist.colRef("content")); grd_foldwordlist.valueMatrix(li_row, grd_foldwordlist.colRef("seq")) = 10 * (++cnt); grd_foldwordlist.valueMatrix(li_row, grd_foldwordlist.colRef("status")) = "i"; } if ( lb_endyn && cnt > 0) { grd_foldwordlist.refresh(); grd_foldwordlist.bottomrow = grd_foldwordlist.row; } } } initPopupMenu(); // Reset Right Popupmenu } /** * @--------------------------------------------------- * @creat : 20100000 * @author : ÃÖ¿øµ· * @desc : Æú´õº° ¼ú½Ä¾î »èÁ¦ * @--------------------------------------------------- */ function fClkBtnfoldwordDel() { var delnode = instance1.selectSingleNode(sDELFOLDWORDINFO_PATH); var la_foldwordsel = new Array(); // »èÁ¦ ros Desc Àӽà ÀúÀå var j = 0; for(var i=(grd_foldwordlist.selectedRows-1); i>=0; i--) { la_foldwordsel[j++] = grd_foldwordlist.selectedRow(i); } // »èÁ¦ ³ëµå¸¦ '»èÁ¦³ëµå'¿¡ Àӽà ÀúÀåÀ» Çϰí, »èÁ¦ÇÔ(=> ÀúÀå ½Ã »èÁ¦Á¤º¸ Ȱ¿ë) for(i=0; i