SPAEA02603_결과관리및조회사진관리 전체크기(사이버나이프).xrw 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. <image>
  11. <attachfile>
  12. <image/>
  13. <printyn/>
  14. </attachfile>
  15. </image>
  16. </main>
  17. <init/>
  18. <hidden>
  19. <popupmenu>
  20. <menu>
  21. <label>출력</label>
  22. <func>fPrint</func>
  23. </menu>
  24. </popupmenu>
  25. </hidden>
  26. </root>
  27. </instance>
  28. <submission id="TRAEA03904" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/"/>
  29. <submission id="TRAEA03905" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/imgsend" resultref="/root/imgbinary"/>
  30. <submission id="TXAEA03903" mediatype="multipart/form-data" method="form-data-post" ref="/root/send" resultref="/root/hidden"/>
  31. <submission id="TXAEA03904" mediatype="multipart/form-data" method="form-data-post" ref="/root/delsend" resultref="/root/hidden"/>
  32. <script type="javascript" ev:event="xforms-ready">
  33. <![CDATA[
  34. if (checkOpener()) { //opener 검사
  35. var param = opener.javascript.getParameter("opener_parameter_id"); //opener parameter value를 get
  36. if(param != "") { // opener parameter value가 있는 경우
  37. // 첫번째 방법
  38. // model.makeValue("/root/hidden/dflag",param);
  39. // model.refresh();
  40. // 두번째 방법 parameter value를 이용하여 프로그램 수행
  41. condarray = param.split("▦");
  42. model.setValue("/root/main/image/attachfile/image", condarray[0]);
  43. model.setValue("/root/main/image/attachfile/printyn", condarray[1]);
  44. setImageRefInstance("/root/main/image/attachfile/image");
  45. // 이미지 크기 조절하기
  46. img1.initStyle("height");
  47. img1.initStyle("width");
  48. if(img1.currentStyle.width > 1280)
  49. {
  50. var imgWidth = img1.currentStyle.width;
  51. var imgHeight = img1.currentStyle.height;
  52. var imgRate = 1280 / imgWidth;
  53. img1.attribute("width") = 1280;
  54. img1.attribute("height") = imgHeight * imgRate;
  55. }
  56. if(img1.currentStyle.height > 1024)
  57. {
  58. var imgWidth = img1.currentStyle.width;
  59. var imgHeight = img1.currentStyle.height;
  60. var imgRate = 1024 / imgHeight;
  61. img1.attribute("width") = imgWidth / imgRate;
  62. img1.attribute("height") = 1024;
  63. }
  64. img1.refresh();
  65. model.refresh();
  66. if(model.getValue("/root/main/image/attachfile/printyn") == "Y")
  67. {
  68. fPrint();
  69. }
  70. }
  71. }
  72. ]]>
  73. </script>
  74. </model>
  75. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  76. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  77. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  78. <script type="javascript" src="../../../ast/examcureweb/js/AEZ0001.js"/>
  79. <script type="javascript">
  80. <![CDATA[
  81. function fPrint()
  82. {
  83. group3.attribute("width") = "1280";
  84. group3.attribute("height") = "1024";
  85. group3.attribute("scroll") = "none";
  86. body.attribute("pagewidth") = "1320";
  87. body.attribute("pageheight") = "1050";
  88. body.attribute("scroll") = "none";
  89. window.width = "1330";
  90. window.height = "1050";
  91. window.print();
  92. }
  93. ]]>
  94. </script>
  95. </xhtml:head>
  96. <xhtml:body pagewidth="1200" pageheight="1000" style="margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  97. <group id="group3" scroll="auto" style="left:0px; top:0px; width:1280px; height:1024px; margin-left:0; margin-top:0; margin-right:0; margin-bottom:0; ">
  98. <img id="img1" ref="/root/main/image/attachfile/image" style="left:0px; top:0px; width:1280px; height:1024px; background-stretch:stretch; border-color:#B0B0B0; border-style:none; ">
  99. <script type="javascript" ev:event="ondblclick">
  100. <![CDATA[
  101. window.close();
  102. ]]>
  103. </script>
  104. <script type="javascript" ev:event="onclick">
  105. <![CDATA[
  106. setPopupMenu("img1", false, "/root/hidden/popupmenu/menu", "label", "func");
  107. ]]>
  108. </script>
  109. <script type="javascript" ev:event="DOMFocusOut">
  110. <![CDATA[
  111. initPopupMenu();
  112. ]]>
  113. </script>
  114. </img>
  115. </group>
  116. </xhtml:body>
  117. </xhtml:html>