123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>SMRPE03000_기관마크 이미지 관리</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <imgdata>
- <photimg/>
- </imgdata>
- <imgviewlist>
- <instcd/>
- <photimg/>
- </imgviewlist>
- </main>
- <send>
- <issinstcd/>
- <imgviewlist/>
- </send>
- <init/>
- <hidden/>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fCheckAuth();
- model.removeNodeset(grd_imgviewlist.nodeset);
- misfMsterDetailSet(grd_imgviewlist, null, "TRRPE03001" ,"Y");
-
- misfComboInstCdListMulti("cmb_issinstcd_search",getCurrentDate(),"","N");
- model.refresh();
- ]]>
- </script>
- <script type="javascript">
- <![CDATA[
- //========================================================================================
- //버튼에 대한 화면 권한 체크(R : 읽기, X : 입력/수정/삭제, P : 출력)
- //========================================================================================
- function fCheckAuth() {
- btn_search.disabled = !checkAuth("R") ;
- btn_save.disabled = !checkAuth("X") ;
- }
-
- function fChangeImage(imgsrc) {
- img_hidden.src = imgsrc; // 파일에서 읽은 이미지의 base64 encoding 값을 가져오기 위한 이미지 컨트롤
- var data = img_hidden.getbase64data(); // base64 encoding 문자열을 가져온다.
-
- model.setValue("/root/main/imgdata/photimg",data,true); // 이미지를 보여주기 위하여 view용 이미지컨트롤의 ref instance에 값을 저장
- setImageRefInstance("/root/main/imgdata/photimg"); //base64 encoding 문자열을 이미지로 변환하여 보여준다,
-
- img_view.attribute("width")= "200";
- img_view.attribute("height")= "45";
- var cur_rows = grd_imgviewlist.rows;
- var instcd=model.getValue("/root/send/issinstcd");
- var imginstcd=model.getValue("/root/main/imgviewlist[1]/instcd");
-
- if(img_hidden.src != "../../../com/commonweb/images/no_image.gif" && imginstcd == ""){//이미지추가시 그리드 추가
- grd_imgviewlist.addrow(); // 입력할 행 추가.
- cur_row = grd_imgviewlist.row; // 추가된 행 번호 가져오기
- // 그리드에 추가
- model.setValue("/root/main/imgviewlist["+cur_row+"]/instcd",instcd);
- model.setValue("/root/main/imgviewlist["+cur_row+"]/photimg",data,true);
- }else if(img_hidden.src != "../../../com/commonweb/images/no_image.gif" && imginstcd != ""){//업데이트시 그리드셋팅
- grd_imgviewlist.addStatus(1,"update");
- model.setValue("/root/main/imgviewlist[1]/instcd",instcd);
- model.setValue("/root/main/imgviewlist[1]/photimg",data,true);
- }
-
- model.refresh();
- }
-
- function fRetrImage() {//조회시 그리드에 base64 encoding data셋팅하고 사진이미지 보여준다.
- if (grd_imgviewlist.Rows <= grd_imgviewlist.fixedRows) {
- fChangeImage("../../../com/commonweb/images/no_image.gif");//초기 이미지설정
- }
- else {
- for( var i = grd_imgviewlist.fixedRows ; i < grd_imgviewlist.Rows ; i++ ) {
- var imgdata = model.getValue("/root/main/imgviewlist["+i+"]/photimg"); // base64 encoding 문자열을 가져온다.
- model.setValue("/root/main/imgdata/photimg", imgdata,true);
- setImageRefInstance("/root/main/imgdata/photimg");
- }
- grd_imgviewlist.rebuild();
- }
- model.refresh();
- }
- ]]>
- </script>
- <submission id="TRRPE03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/imgviewlist"/>
- <submission id="TXRPE03001" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/save" resultref="/root/temp"/>
- </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/dateHelper.js"/>
- <script type="javascript" src="../../../mis/miscommonweb/js/MIS.js"/>
- </xhtml:head>
- <xhtml:body pagewidth="500" pageheight="300">
- <group id="group1" style="left:0px; top:0px; width:405px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:240px; height:13px; ">기관마크 이미지 관리</caption>
- </group>
- <group id="group2" scroll="auto" style="left:0px; top:38px; width:445px; height:212px; ">
- <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:10px; width:410px; height:35px; background-color:#fffbf2; border-color:#ffd799; "/>
- <caption id="caption2" class="search_name" style="left:15px; top:19px; width:151px; height:17px; ">기관선택 :</caption>
- <line id="line207" class="line_1" style="x1:0px; y1:65px; x2:410px; y2:65px; "/>
- <button id="btn_search" class="btn1_letter2" navindex="8" style="left:345px; top:18px; width:56px; height:22px; text-align:left; ">
- <caption>조회</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- submit("TRRPE03001"); //직인이미지
- fRetrImage();
- ]]>
- </script>
- </button>
- <line id="line2" class="line_4" style="x1:330px; y1:14px; x2:330px; y2:40px; border-color:#ffe4bb; border-left-style:solid; "/>
- <select1 id="cmb_issinstcd_search" ref="/root/send/issinstcd" class="combo_s_essential" appearance="minimal" style="left:104px; top:19px; width:159px; height:19px; ">
- <choices>
- <itemset>
- <label/>
- <value/>
- </itemset>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- btn_search.dispatch("DOMActivate");
- ]]>
- </script>
- </select1>
- <caption id="caption172" class="cell_1" style="left:10px; top:80px; width:210px; height:55px; vertical-align:middle; "/>
- <button id="btn_fileupload" class="btn2_letter9" style="left:10px; top:140px; width:119px; height:19px; text-align:center; ">
- <caption>마 크 업 로 드</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var instcd=model.getValue("/root/send/issinstcd");
- if(instcd == ""){
- messageBox("기관을 ","C002");
- return;
- }
- var file = openImageFileDialog(1048576); // image 파일이 너무 크면 submit 시간이 매우 오래(5분이상) 걸리므로 가급적 사이즈를 작게 제한한다.
- if (file == "") {
- return;
- }
- fChangeImage(file);
-
- model.refresh();
- ]]>
- </script>
- </button>
- <img id="img_view" ref="/root/main/imgdata/photimg" style="left:15px; top:85px; width:200px; height:45px; background-stretch:stretch; "/>
- <img id="img_hidden" visibility="hidden" style="left:15px; top:83px; width:200px; height:45px; "/>
- <datagrid id="grd_imgviewlist" nodeset="/root/main/imgviewlist" visibility="hidden" caption="기관코드^마크이미지" colsep="^" colwidth="100, 100" mergecellsfixedrows="bycolrec" rowheader="update" rowsep="|" style="left:175px; top:90px; width:240px; height:50px; ">
- <col ref="instcd"/>
- <col ref="photimg" style="background-stretch:stretch; "/>
- </datagrid>
- </group>
- <group id="grp_btn" scroll="auto" style="left:0px; top:12px; width:405px; height:28px; ">
- <button id="button16" class="btn3_letter4" visibility="hidden" style="left:0px; top:3; width:80px; height:22px; ">
- <caption>화면이동</caption>
- </button>
- <button id="btn_save" class="btn4_letter2" style="left:345px; top:3px; width:56px; height:22px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- misfSave("TXRPE03001");
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|