123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- /*
-
- (SMMNT00200.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- /**
- * @group :
- * @ver : 2007.05.15
- * @by : 김진명
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 설명
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch()
- {
- var iRow = -1, iRow1, iRow2;
- model.copyNode("/root/send/reqdata", "/root/main/cond");
- submit("TRMNT00201", false);
- model.resetInstancenode("/root/send");
- var message = model.getValue("/root/properties/error/msg");
- var messageTemp = message.substring(0,1);
- if( messageTemp != "0" ){//조회건이 있으면
-
- model.setValue("/root/hidden/searflag", "ok");//검색 체크 플래그 값
- var synonym = model.getValue("/root/main/icnpinfo/icnpinfolist/synonym");
- var smlarty = model.getValue("/root/main/icnpinfo/icnpinfolist/smlarty");
- var antonym = model.getValue("/root/main/icnpinfo/icnpinfolist/antonym");
- var synonymTemp = synonym.split(","); //동의어
- var cnt1 = synonymTemp.length;
- var count = 1;
- for( var i = 0; i < cnt1; i++ ){
- if( i == 0 ){
- iRow = grd_wrdlist.row;
- model.setValue("/root/main/wrdlists/wrdlist/ssawrd", "동의어");
- }
- if( ( i != 0 )&&( i % 5 == 0 ) ){
-
- grd_wrdlist.addRow();
- iRow = grd_wrdlist.rows;
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/ssawrd", "동의어");
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/wrd"+((i+1)-(count*5)), synonymTemp[i]);
- count++;
- }else{
- if( iRow > 1 ){//첫번째 row인지 체크
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow + "]/wrd"+((i+1)-((count-1)*5)), synonymTemp[i]);
- }else{
- model.setValue("/root/main/wrdlists/wrdlist/wrd"+((i+1)-((count-1)*5)), synonymTemp[i]);
- }
- }
- }
-
- var smlartyTemp = smlarty.split(","); //유사어
- var cnt2 = smlartyTemp.length;
- grd_wrdlist.addRow();
- count = 1;
- for( var j = 0; j < cnt2; j++ ){
- if( j == 0 ){
- iRow1 = grd_wrdlist.rows;
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/ssawrd", "유사어");
- }
-
- if( ( j != 0 )&&( j % 5 == 0 ) ){
-
- grd_wrdlist.addRow();
- iRow1 = grd_wrdlist.rows;
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/ssawrd", "유사어");
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/wrd"+((j+1)-(count*5)), smlartyTemp[j]);
- count++;
- }else{
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow1 + "]/wrd"+((j+1)-((count-1)*5)), smlartyTemp[j]);
- }
- }
-
- var antonymTemp = antonym.split(","); //반대어
- var cnt3 = antonymTemp.length;
- grd_wrdlist.addRow();
- count = 1;
- for( var k = 0; k < cnt3; k++ ){
-
- if( k == 0 ){
- iRow2 = grd_wrdlist.rows;
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/ssawrd", "반대어");
- }
-
- if( ( k != 0 )&&( k % 5 == 0 ) ){
-
- grd_wrdlist.addRow();
- iRow2 = grd_wrdlist.rows;
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/ssawrd", "반대어");
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/wrd"+((k+1)-(count*5)), antonymTemp[k]);
- count++;
- }else{
-
- model.setValue("/root/main/wrdlists/wrdlist[" + iRow2 + "]/wrd"+((k+1)-((count-1)*5)), antonymTemp[k]);
- }
- }
- grd_wrdlist.colStyle(0, "all", "background-color") = "#cce8ff";
- model.refresh();
-
- }else{
- messageBox("검색된 데이터가 ", "I004");
-
- if( model.getValue("/root/hidden/searflag") == "ok" ){//검색된것이 있는지 없는지
- window.reload();
- }else {
- ipt_srchwrd.value = "";
- model.setFocus("ipt_srchwrd");
- }
- }
-
- grd_wrdlist.autoResize = true;
- }
|