123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- function fSetImageView(){
- var selectimg = document.controls(event.target);
- var selectimgdata = selectimg.getBase64data();
- var selectimgnm = "TEST";
- model.setValue("/root/send/imgeitem/imgedata", selectimgdata);
- model.setValue("/root/send/imgeitem/imgenm", selectimgnm);
-
- //setParameter("selectimgecd", "0000001001,0000002001,0000003001,0000004001,0000005001,0000006001,0000007001");
- setParameter("formcd", "0000000043");
- //setParameter("degnitemno", "100570");
- //setParameter("formdegnseq", "179");
- setParameter("flag", "1");
- //setParameter("selectimgdata",selectimgdata);
- //setParameter("selectimgnm", selectimgnm);
- open("SMMMR03600_??????????","2","1","1","SMMMR03600_??????????");
- }
- function fSetCompView1(){
- // var comp = body.createChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
- var selectimg = document.controls(event.target);
-
- var node1 = instance1.selectSingleNode("/root/main/compimg1");
- var node2 = instance1.selectSingleNode("/root/main/compimg2");
- if(!node1){
- var comp = body.createChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
- var compdata1 = selectimg.getBase64data();
- model.makeValue("/root/main/compimg1", compdata1);
- setImageRefInstance("/root/main/compimg1");
- comp.refresh();
- } else if (!node2){
- var comp = body.createChild("xforms:img", "id:comp_window2; ref:/root/main/compimg2; left:0px; top:310px; width:400px; height:300px; background-stretch:stretch;");
- var compdata2 = selectimg.getBase64data();
- model.makeValue("/root/main/compimg2", compdata2);
- setImageRefInstance("/root/main/compimg2");
- comp.refresh();
- }
- }
- /**
- ?????? ???????? ???????? ???? function
- ???????? ?????? ?????? ????
- ???? ?? ?? ???? ???????? ???? ?????? 100???? ???? -> ?? ???? ???????? ???????? ???????? ?????? ?????? ????
- */
- function fSetCompView(){
- // var comp = body.crateChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
- var selectimg = document.controls(event.target);
- var node = new Array(100);
- var leftvalue = 3;
- //var imgref = selectimg.attribute("ref"); // ???? ?????? ?????? ???? ?? ?????? ???? ?????? ??????.
- if ((selectimg.attribute("border-color") != "#0000ff") && (selectimg.attribute("border-style") != "solid" )){
- selectimg.attribute("border-color") = "#0000ff";
- selectimg.attribute("border-style") = "solid";
- selectimg.attribute("border-width") = "2px";
-
- for(var node_count = 0; node_count < node.length; node_count++){
-
- node[node_count] = instance1.selectSingleNode("/root/main/compimge"+node_count);
- //alert((node[node_count] == null ? "y":"n"));
- var imgid = "comp_imge" + node_count;
- var imgref = "/root/main/compimge"+node_count;
- if (node[node_count] == null){
- var comp = group2.createChild("xforms:img", "id:"+imgid+"; ref:"+imgref+"; left:"+leftvalue+"px; top:2px; width:273px; height:210px; background-stretch:stretch;");
- var compdata = selectimg.getBase64data();
-
- model.makeValue("/root/main/compimge"+node_count, compdata);
- model.makeValue(selectimg.attribute("ref")+"/childid", imgid);
- //model.makeValue(imgref+"/childref", imgref);
- setImageRefInstance("/root/main/compimge"+node_count);
-
- model.refresh();
- break;
- }
- // ?? ?????? ???????? ?????????? ??, ???? ???????? display???? ???? ?????? ????
- // 3?? ???????? ?????? ?????? ?????? ???? ???? ??
- leftvalue = leftvalue + parseInt(document.controls(imgid).attribute("width")) + 3;
- }
- }else {
- selectimg.attribute("border-color") = "";
- selectimg.attribute("border-style") = "";
- selectimg.attribute("border-width") = "";
- fDelCompView(model.getValue(selectimg.attribute("ref")+"/childid"));
- }
- }
- function fDelCompView(ctrlid){
- // var comp = body.crateChild("xforms:img", "id:comp_window1; ref:/root/main/compimg1; left:0px; top:0px; width:400px; height:300px; background-stretch:stretch;");
- var ctrl = document.controls(ctrlid);
- model.removenode(ctrl.attribute("ref"));
- group2.removeChild(ctrlid);
- model.refresh();
- }
|