SMZWT00100_AWT 구문관리.xrw 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
  3. <xhtml:html xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/2002/01/xforms">
  4. <xhtml:head>
  5. <xhtml:title>AWT 단어/구문 관리</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <send>
  10. <sentensetype>W</sentensetype>
  11. <keyword/>
  12. <sentense/>
  13. <awttype>C</awttype>
  14. </send>
  15. <save>
  16. </save>
  17. <main>
  18. <awtlist/>
  19. </main>
  20. <temp>
  21. <awtlist/>
  22. </temp>
  23. </root>
  24. </instance>
  25. <submission id="TRZWT00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" replace="instance" resultref="/root/main/awtlist"/>
  26. <submission id="TXZWT00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/save" replace="instance"/>
  27. </model>
  28. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  29. <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
  30. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  31. <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
  32. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  33. <json/>
  34. </xhtml:head>
  35. <xhtml:body pageheight="700" pagewidth="930">
  36. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">AWT 단어 관리</caption>
  37. <group id="grd_main" style="left:0px; top:20px; width:905px; height:30px; vertical-align:top; ">
  38. <shape id="roundrect1" appearance="roundrect" ellipsewidth="10" ellipseheight="10" style="left:0px; top:0px; width:905px; height:30px; background-color:#fffbf2; border-color:#ffd799; "/>
  39. <input id="ipt_pKeyword" ref="/root/send/keyword" class="input_search" style="left:250px; top:5px; width:100px; height:19px; "/>
  40. <caption id="caption8" class="search_name" style="left:10px; top:5px; width:60px; height:17px; ">유형 :</caption>
  41. <select1 id="radio1" ref="/root/send/sentensetype" class="radio_search" appearance="full" cols="2" overflow="visible" style="left:75px; top:5px; width:95px; height:20px; border-style:none; ">
  42. <choices>
  43. <item>
  44. <label>단어</label>
  45. <value>W</value>
  46. </item>
  47. <item>
  48. <label>구문</label>
  49. <value>S</value>
  50. </item>
  51. </choices>
  52. <script ev:event="xforms-value-changed" type="javascript">
  53. <![CDATA[
  54. model.removenode("/root/main/awtlist");
  55. model.makeNode("/root/main/awtlist");
  56. model.refresh();
  57. if (model.getValue("/root/send/sentensetype") == "W") {
  58. grd_awtlist.valueMatrix(0, 2) = "단어";
  59. grd_awtlist.colHidden(3) = true;
  60. } else {
  61. grd_awtlist.valueMatrix(0, 2) = "검색어";
  62. grd_awtlist.colHidden(3) = false;
  63. }
  64. model.removenode("/root/main/awtlist");
  65. model.makeNode("/root/main/awtlist");
  66. model.refresh();
  67. ]]>
  68. </script>
  69. </select1>
  70. <caption id="cap_awt" class="search_name" visibility="hidden" style="left:595px; top:5px; width:82px; height:17px; ">대상그룹:</caption>
  71. <select1 id="rdo_awt" ref="/root/send/awttype" class="radio_search" visibility="hidden" appearance="full" cols="3" overflow="visible" style="left:680px; top:5px; width:140px; height:20px; border-style:none; ">
  72. <choices>
  73. <item>
  74. <label>개인</label>
  75. <value>P</value>
  76. </item>
  77. <item>
  78. <label>부서</label>
  79. <value>D</value>
  80. </item>
  81. <item>
  82. <label>공용</label>
  83. <value>C</value>
  84. </item>
  85. </choices>
  86. <script ev:event="xforms-value-changed" type="javascript">
  87. <![CDATA[
  88. model.removenode("/root/main/awtlist");
  89. model.makeNode("/root/main/awtlist");
  90. model.refresh();
  91. if (model.getValue("/root/send/awttype") == "C") {
  92. button1.disabled = true;
  93. button2.disabled = true;
  94. button3.disabled = true;
  95. button4.disabled = true;
  96. button5.disabled = true;
  97. } else {
  98. button1.disabled = false;
  99. button2.disabled = false;
  100. button3.disabled = false;
  101. button4.disabled = false;
  102. button5.disabled = false;
  103. }
  104. model.removenode("/root/main/awtlist");
  105. model.makeNode("/root/main/awtlist");
  106. model.refresh();
  107. ]]>
  108. </script>
  109. </select1>
  110. <caption id="caption1" class="search_name" style="left:175px; top:5px; width:86px; height:17px; ">검색어 :</caption>
  111. <caption id="caption2" class="search_name" style="left:355px; top:5px; width:125px; height:17px; ">구문 안의 단어 :</caption>
  112. <input id="input1" ref="/root/send/sentense" class="input_search" style="left:480px; top:5px; width:105px; height:19px; "/>
  113. <button id="btn_search" class="btn1_letter2" style="left:845px; top:5px; width:56px; height:22px; ">
  114. <caption>조회</caption>
  115. <script ev:event="DOMActivate" type="javascript">
  116. <![CDATA[
  117. model.removenode("/root/main/awtlist");
  118. model.makeNode("/root/main/awtlist");
  119. model.refresh();
  120. if (!submit("TRZWT00100"))
  121. return;
  122. grd_awtlist.clearStatus();
  123. if (model.getValue("/root/send/sentensetype") == "W") {
  124. grd_awtlist.valueMatrix(0, 2) = "단어";
  125. grd_awtlist.colHidden(3) = true;
  126. } else {
  127. grd_awtlist.valueMatrix(0, 2) = "검색어";
  128. grd_awtlist.colHidden(3) = false;
  129. }
  130. grd_awtlist.resizeCells();
  131. ]]>
  132. </script>
  133. </button>
  134. <line id="line13" style="x1:831px; y1:2px; x2:831px; y2:28px; border-color:#ffe4bb; border-left-style:solid; "/>
  135. </group>
  136. <datagrid id="grd_awtlist" nodeset="/root/main/awtlist/item" allowuserresize="true" autoresize="true" autosizemouse="true" caption="순번^단어^구문" colwidth="90, 141, 611, 100, 100, 100" dataheight="25" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="25" tooltip="true" style="left:0px; top:75px; width:905px; height:585px; border-color:#808080; ">
  137. <col ref="awtseq"/>
  138. <col ref="keyword" type="input"/>
  139. <col ref="sentense" type="input" visibility="hidden"/>
  140. <col ref="sentensetype" type="input" visibility="hidden"/>
  141. <col ref="awttype" type="input" visibility="hidden"/>
  142. <col ref="userid" type="input" visibility="hidden"/>
  143. <script ev:event="onaftersort" type="javascript">
  144. <![CDATA[
  145. grd_awtlist.gridToInstance();
  146. ]]>
  147. </script>
  148. </datagrid>
  149. <button id="button5" class="btn2_letter4" visibility="hidden" style="left:840px; top:0px; width:64px; height:19px; ">
  150. <caption>엑셀입력</caption>
  151. <script ev:event="DOMActivate" type="javascript">
  152. <![CDATA[
  153. var fileName = window.fileDialog("open", "", false);
  154. if(fileName==""){
  155. return;
  156. }
  157. grd_awtlist.loadExcel(fileName);
  158. grd_awtlist.deleteRow(1);
  159. ]]>
  160. </script>
  161. </button>
  162. <caption id="caption_cdgrup_list" class="tit_2" style="left:0px; top:60px; width:118px; height:13px; ">AWT 단어</caption>
  163. <button id="button1" class="btn2_letter4" visibility="hidden" style="left:770px; top:0px; width:64px; height:19px; ">
  164. <caption>엑셀저장</caption>
  165. <script ev:event="DOMActivate" type="javascript">
  166. <![CDATA[
  167. var fileName = window.fileDialog("save",",",false,"excel","xls","All File(*.*)|*.*|Excel File(*.xls)|*.xls"); // 2009-07-01 엑셀저장 두번째 저장 실패 오류 확인 두번째 테스트
  168. if (fileName != "")
  169. {
  170. grd_awtlist.saveExcel(fileName);
  171. }
  172. ]]>
  173. </script>
  174. </button>
  175. <caption id="caption4" style="left:225px; top:60px; width:195px; height:15px; ">단어는 최대 2000개까지 표시됩니다.</caption>
  176. <button id="button2" class="btn5_letter3" style="left:730px; top:55px; width:53px; height:19px; ">
  177. <caption>행추가</caption>
  178. <script ev:event="DOMActivate" type="javascript">
  179. <![CDATA[
  180. grd_awtlist.addRow();
  181. ]]>
  182. </script>
  183. </button>
  184. <button id="button3" class="btn5_letter3" style="left:785px; top:55px; width:53px; height:19px; ">
  185. <caption>행삭제</caption>
  186. <script ev:event="DOMActivate" type="javascript">
  187. <![CDATA[
  188. grd_awtlist.addStatus(grd_awtlist.row, "delete");
  189. ]]>
  190. </script>
  191. </button>
  192. <button id="button4" class="btn4_letter2" style="left:850px; top:55px; width:56px; height:22px; ">
  193. <caption>저장</caption>
  194. <script ev:event="DOMActivate" type="javascript">
  195. <![CDATA[
  196. for (var i = 1; i < grd_awtlist.rows; i++) {
  197. if (model.getValue("/root/send/sentensetype") == "W")
  198. model.setValue("/root/main/awtlist/item[" + i + "]/sentense", model.getValue("/root/main/awtlist/item[" + i + "]/keyword"));
  199. model.setValue("/root/main/awtlist/item[" + i + "]/awttype", model.getValue("/root/send/awttype"));
  200. model.setValue("/root/main/awtlist/item[" + i + "]/sentensetype", model.getValue("/root/send/sentensetype"));
  201. }
  202. if( messageBox("AWT 단어/구문을 저장","Q002") == 6){
  203. model.setValue("/root/save", grd_awtlist.getUpdateData());
  204. if (submit("TXZWT00100")) {
  205. alert("저장되었습니다.");
  206. btn_search.dispatch("DOMActivate");
  207. } else {
  208. alert("저장에 실패하였습니다.");
  209. }
  210. }
  211. ]]>
  212. </script>
  213. </button>
  214. </xhtml:body>
  215. </xhtml:html>