SPZTP00300_프로젝트진척관리(첨부파일저장).xrw 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <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">
  4. <xhtml:head>
  5. <xhtml:title>프로젝트 진척관리(첨부파일)</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main/>
  10. <send>
  11. <attach>
  12. <file/>
  13. </attach>
  14. <title/>
  15. <prcscd/>
  16. <subteam/>
  17. </send>
  18. <cur_scrn/>
  19. </root>
  20. </instance>
  21. <script type="javascript" ev:event="xforms-model-construct-done">
  22. <![CDATA[
  23. model.removeNodeset("/root/send/attach");
  24. model.resetInstanceNode("/root/send");
  25. // 팝업 단독 테스트용 시작
  26. // model.setValue("/root/send/prcscd","330");
  27. // model.setValue("/root/send/subteam","SWAT");
  28. // model.setValue("/root/cur_scrn","테스트");
  29. // 팝업 단독 테스트용 끝
  30. var subteam = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("subteam"));
  31. var prcscd = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("prcscd"));
  32. var cur_scrn = opener.grd_projlist.textmatrix(opener.grd_projlist.row,opener.grd_projlist.colRef("scrnname"));
  33. // 첨부파일 화면에서 최초 그리드 선택 없이 띄웠을 경우 search_file에서 값을 받아 와야 한다.
  34. if (subteam == "" && prcscd == "")
  35. {
  36. var prcscd = opener.model.getValue("/root/send/search_file/prcscd");
  37. var subteam = opener.model.getValue("/root/send/search_file/subteam");
  38. var cur_scrn = opener.model.getValue("/root/cur_scrn");
  39. }
  40. model.setValue("/root/send/prcscd",prcscd);
  41. model.setValue("/root/send/subteam",subteam);
  42. model.setValue("/root/cur_scrn",cur_scrn);
  43. model.refresh();
  44. ]]>
  45. </script>
  46. <submission id="TRZTP00101" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search" resultref="/root/main/projlist/list"/>
  47. <submission id="TRZTP00103" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send/search_file" resultref="/root/main/filelist/list"/>
  48. <submission id="TXZTP00103" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/main/filelist/list"/>
  49. </model>
  50. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  51. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  52. <script type="javascript">
  53. <![CDATA[
  54. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  55. function fInitialize() {
  56. model.resetInstanceNode("/root/send");
  57. }
  58. ]]>
  59. </script>
  60. </xhtml:head>
  61. <xhtml:body pagewidth="500" pageheight="150">
  62. <caption id="caption2" class="tit_1" style="left:1px; top:0px; width:217px; height:13px; vertical-align:middle; ">프로젝트 진척관리(첨부파일저장)</caption>
  63. <caption id="caption1" class="tit_2" style="left:8px; top:23px; width:145px; height:13px; vertical-align:middle; ">첨부파일 :</caption>
  64. <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; ">
  65. <col ref="file"/>
  66. </datagrid>
  67. <button id="btn_upload" class="btn5_letter2" style="left:452px; top:20px; width:42px; height:19px; ">
  68. <caption>저장</caption>
  69. <script type="javascript" ev:event="DOMActivate">
  70. <![CDATA[
  71. for (i = grd_attach.fixedRows ; i < grd_attach.rows-1 ; i++)
  72. {
  73. for (h = i+1 ; h < grd_attach.rows ; h++)
  74. {
  75. if(grd_attach.textmatrix(i,grd_attach.colRef("file")) == grd_attach.textmatrix(h,grd_attach.colRef("file")) )
  76. {
  77. alert("동일한 파일이 존재 합니다!");
  78. model.removeNodeset("/root/send/attach");
  79. // model.resetInstanceNode("/root/send");
  80. grd_attach.rebuild();
  81. return;
  82. }
  83. }
  84. }
  85. if (submit("TXZTP00103")) {
  86. model.removeNodeset("/root/send/attach");
  87. window.close();
  88. // model.refresh();
  89. }
  90. ]]>
  91. </script>
  92. </button>
  93. <upload id="upload1" nodeset="/root/send/attach/file" filesize="10485760" validate="false" style="left:278px; top:20px; width:30px; height:20px; "/>
  94. <button id="button1" class="btn2_letter4" style="left:381px; top:20px; width:64px; height:19px; ">
  95. <caption>파일선택</caption>
  96. <script type="javascript" ev:event="DOMActivate">
  97. <![CDATA[
  98. var maxsize = upload1.attribute("filesize");
  99. files = window.fileDialog("open", "|", true);
  100. filelist = files.split("|");
  101. for(var i = 0 ; i < filelist.length ; i++ ) {
  102. grd_attach.addRow(false);
  103. grd_attach.valueMatrix(grd_attach.rows - 1, 0) = filelist[i];
  104. if (!checkFileSize(upload1)){
  105. grd_attach.removeItem();
  106. messageBox("파일 크기가 최대치("+maxsize+"Byte)를", "E003");
  107. }
  108. }
  109. ]]>
  110. </script>
  111. </button>
  112. <caption id="caption9" ref="/root/cur_scrn" style="left:93px; top:20px; width:235px; height:20px; "></caption>
  113. </xhtml:body>
  114. </xhtml:html>