123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.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>프로젝트 진척관리(첨부파일)</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main/>
- <send>
- <attach>
- <file/>
- </attach>
- <title/>
- <prcscd/>
- <subteam/>
- </send>
- <cur_scrn/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-model-construct-done">
- <![CDATA[
- model.removeNodeset("/root/send/attach");
- model.resetInstanceNode("/root/send");
-
- // 팝업 단독 테스트용 시작
- // model.setValue("/root/send/prcscd","330");
- // model.setValue("/root/send/subteam","SWAT");
- // model.setValue("/root/cur_scrn","테스트");
- // 팝업 단독 테스트용 끝
-
- var subteam = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("subteam"));
- var prcscd = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("prcscd"));
- var cur_scrn = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("scrnname"));
- // 첨부파일 화면에서 최초 그리드 선택 없이 띄웠을 경우 search_file에서 값을 받아 와야 한다.
- if (subteam == "" && prcscd == "")
- {
- var prcscd = opener.model.getValue("/root/send/search_file/prcscd");
- var subteam = opener.model.getValue("/root/send/search_file/subteam");
- var cur_scrn = opener.model.getValue("/root/cur_scrn");
- }
-
- model.setValue("/root/send/prcscd",prcscd);
- model.setValue("/root/send/subteam",subteam);
- model.setValue("/root/cur_scrn",cur_scrn);
- model.refresh();
- ]]>
- </script>
- <submission id="TRZTP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/projlist/list"/>
- <submission id="TRZTP00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search_file" resultref="/root/main/filelist/list"/>
- <submission id="TXZTP00103" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/main/filelist/list"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- model.resetInstanceNode("/root/send");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body pagewidth="500" pageheight="150">
- <caption id="caption2" class="tit_1" style="left:1px; top:0px; width:217px; height:13px; vertical-align:middle; ">프로젝트 진척관리(첨부파일저장)</caption>
- <caption id="caption1" class="tit_2" style="left:8px; top:23px; width:145px; height:13px; vertical-align:middle; ">첨부파일 :</caption>
- <datagrid id="grd_attach" nodeset="/root/send/attach" caption="파일경로^" colwidth="407" extendlastcol="scroll" mergecellsfixedrows="bycolrec" tooltip="true" style="left:3px; top:45px; width:495px; height:100px; ">
- <col ref="file"/>
- </datagrid>
- <button id="btn_upload" class="btn5_letter2" style="left:452px; top:20px; width:42px; height:19px; ">
- <caption>저장</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- for (i = grd_attach.fixedRows ; i < grd_attach.rows-1 ; i++)
- {
- for (h = i+1 ; h < grd_attach.rows ; h++)
- {
- if(grd_attach.textmatrix(i,grd_attach.colRef("file")) == grd_attach.textmatrix(h,grd_attach.colRef("file")) )
- {
- alert("동일한 파일이 존재 합니다!");
- model.removeNodeset("/root/send/attach");
- // model.resetInstanceNode("/root/send");
- grd_attach.rebuild();
- return;
- }
- }
- }
-
- if (submit("TXZTP00103")) {
- model.removeNodeset("/root/send/attach");
- window.close();
- // model.refresh();
- }
- ]]>
- </script>
- </button>
- <upload id="upload1" nodeset="/root/send/attach/file" filesize="10485760" validate="false" style="left:278px; top:20px; width:30px; height:20px; "/>
- <button id="button1" class="btn2_letter4" style="left:381px; top:20px; width:64px; height:19px; ">
- <caption>파일선택</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var maxsize = upload1.attribute("filesize");
-
- files = window.fileDialog("open", "|", true);
- filelist = files.split("|");
- for(var i = 0 ; i < filelist.length ; i++ ) {
- grd_attach.addRow(false);
- grd_attach.valueMatrix(grd_attach.rows - 1, 0) = filelist[i];
- if (!checkFileSize(upload1)){
- grd_attach.removeItem();
- messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
-
- }
- }
- ]]>
- </script>
- </button>
- <caption id="caption9" ref="/root/cur_scrn" style="left:93px; top:20px; width:235px; height:20px; "></caption>
- </xhtml:body>
- </xhtml:html>
|