SPTSS00301_파일다운로드팝업.xrw 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/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>Untitle</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <list>
  11. <attachlist>
  12. <filenm/>
  13. <filesize/>
  14. <filetype/>
  15. <filepath/>
  16. <reportid/>
  17. </attachlist>
  18. </list>
  19. </main>
  20. <send>
  21. <reportid/>
  22. </send>
  23. <init/>
  24. <hidden/>
  25. </root>
  26. </instance>
  27. <script type="javascript" ev:event="xforms-model-construct">
  28. <![CDATA[
  29. model.removeNodeset("/root/req/grid");
  30. ]]>
  31. </script>
  32. <script type="javascript" ev:event="xforms-ready">
  33. <![CDATA[
  34. fInitialize();
  35. submit("TRTSS00301");
  36. ]]>
  37. </script>
  38. <submission id="TRTSS00301" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  39. <submission id="TRTSS00302" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main"/>
  40. </model>
  41. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  42. <script type="javascript">
  43. <![CDATA[
  44. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  45. function fInitialize() {
  46. model.removeNodeset("/root/main/list/attachlist");
  47. model.refresh();
  48. }
  49. ]]>
  50. </script>
  51. </xhtml:head>
  52. <xhtml:body pagewidth="670" pageheight="410">
  53. <caption id="caption2" class="tit_1" style="left:0px; top:0px; width:217px; height:14px; vertical-align:middle; ">파일 다운로드</caption>
  54. <line id="line8" class="line_1" style="x1:0px; y1:32px; x2:665px; y2:32px; "/>
  55. <caption id="caption20" class="tit_2" style="left:6px; top:17px; width:118px; height:13px; ">첨부파일 목록</caption>
  56. <button id="btn_ok" class="btn4_letter2" style="left:610px; top:380px; width:56px; height:22px; ">
  57. <caption>확인</caption>
  58. <close ev:event="DOMActivate"/>
  59. </button>
  60. <datagrid id="grd_attachfile" nodeset="/root/main/list/attachlist" visibility="visible" caption="첨부파일명^파일크기^파일종류^서버저장경로^보고서ID^" colwidth="466, 97, 100, 100, 100" extendlastcol="scroll" mergecellsfixedrows="bycolrec" style="left:0px; top:37px; width:665px; height:333px; ">
  61. <col ref="filenm"/>
  62. <col ref="filesize"/>
  63. <col ref="filetype"/>
  64. <col ref="filepath" visibility="hidden"/>
  65. <col ref="reportid" visibility="hidden"/>
  66. <script type="javascript" ev:event="ondblclick">
  67. <![CDATA[
  68. alert(getActionURL("TRTSS00302"));
  69. var idx = grd_attachfile.row;
  70. var filepath = model.getValue("/root/main/list/attachlist["+idx+"]/filepath");
  71. var filenm = model.getValue("/root/main/list/attachlist["+idx+"]/filenm");
  72. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  73. if (localfile != "") {
  74. model.download(getActionURL("TRTSS00302")+"&filepath="+filepath,localfile);
  75. var rtn = messageBox("파일을", "Q004");
  76. if( rtn == 6 ) {
  77. window.exec(localfile);
  78. }
  79. }
  80. ]]>
  81. </script>
  82. </datagrid>
  83. </xhtml:body>
  84. </xhtml:html>