SPMRI02500_미비날짜선택.xrw 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <?xml version="1.0" encoding="UTF-16"?>
  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>미비날짜선택</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <hidden>
  10. <calendar>
  11. <year/>
  12. <month/>
  13. <weeklist>
  14. <list>
  15. <sun/>
  16. <mon/>
  17. <tue/>
  18. <wed/>
  19. <thu/>
  20. <fri/>
  21. <sat/>
  22. <sun_memo/>
  23. <mon_memo/>
  24. <tue_memo/>
  25. <wed_memo/>
  26. <thu_memo/>
  27. <fri_memo/>
  28. <sat_memo/>
  29. </list>
  30. </weeklist>
  31. </calendar>
  32. </hidden>
  33. <main>
  34. <chos>
  35. <chosdd/>
  36. </chos>
  37. </main>
  38. <init>
  39. <menu>
  40. <menu>
  41. <label>삭제</label>
  42. <func>fDelChosList</func>
  43. </menu>
  44. </menu>
  45. </init>
  46. </root>
  47. </instance>
  48. <script type="javascript" ev:event="xforms-ready">
  49. <![CDATA[
  50. fInitialize();
  51. ]]>
  52. </script>
  53. </model>
  54. <script type="javascript">
  55. <![CDATA[
  56. function setCalendar(dateObj) {
  57. // 그리드 초기화
  58. model.removeNodeset("/root/hidden/calendar/weeklist/list");
  59. //grd_calendar.rebuild()
  60. dateObj.setDate(1);
  61. var startDay = dateObj.getDay();
  62. var days = dateObj.getMonthDay();
  63. var rows = Math.ceil( ( startDay + days ) / 7 );
  64. for( var i = 0; i < rows; i++ )
  65. grd_calendar.addRow(false);
  66. grd_calendar.rebuild();
  67. var rowIndex = grd_calendar.fixedRows;
  68. var colIndex = startDay;
  69. for( var i = 1; i <= days; i++ ) {
  70. grd_calendar.valueMatrix(rowIndex, colIndex) = i;
  71. colIndex++;
  72. if( colIndex == 7 ) {
  73. colIndex = 0;
  74. rowIndex++;
  75. }
  76. }
  77. }
  78. function setCellColor(gridObj) {
  79. var calRow = gridObj.row;
  80. var calCol = gridObj.col;
  81. var tmpCalCol;
  82. if( calCol < 7 )
  83. tmpCalCol = calCol + 7;
  84. else
  85. tmpCalCol = calCol - 7;
  86. //gridObj.rebuildStyle();
  87. //gridObj.cellStyle("background-color", calRow, calCol) = "#ece1ec";
  88. gridObj.cellStyle("background-color", calRow, tmpCalCol) = "#daa7d9";
  89. }
  90. ]]>
  91. </script>
  92. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  93. <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
  94. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  95. <script type="javascript" src="../../../emr/unprepmngtweb/js/SPMRI02500.js"/>
  96. </xhtml:head>
  97. <xhtml:body pagewidth="476" pageheight="280" guideline="1,446;1,462;2,280;" style="margin-left:8; margin-top:8; margin-right:8; margin-bottom:8; ">
  98. <datagrid id="grd_calendar" nodeset="/root/hidden/calendar/weeklist/list" class="gridcalendar" autoresize="true" caption="일^월^화^수^목^금^토" colsep="^" colwidth="50, 50, 50, 50, 50, 50, 50" extendlastcol="noscroll" focuscolor="transparent" mergecellsfixedrows="bycolrec" rowsep="|" style="left:0px; top:45px; width:350px; height:195px; ">
  99. <col class="color_sun" ref="sun" style="border-bottom-width:1px; "/>
  100. <col ref="mon" style="border-bottom-width:1px; "/>
  101. <col ref="tue" style="border-bottom-width:1px; "/>
  102. <col ref="wed" style="border-bottom-width:1px; "/>
  103. <col ref="thu" style="border-bottom-width:1px; "/>
  104. <col ref="fri" style="border-bottom-width:1px; "/>
  105. <col class="color_sat" ref="sat" style="border-bottom-width:1px; "/>
  106. <script type="javascript" ev:event="onclick">
  107. <![CDATA[
  108. fAddGrdChoiDD();
  109. ]]>
  110. </script>
  111. </datagrid>
  112. <datagrid id="grd_choslist" nodeset="/root/main/chos/chosdd" scroll="autovscroll" caption="선택일" colsep="^" colwidth="77" explorerbar="sort" extendlastcol="noscroll" mergecellsfixedrows="bycolrec" rowsep="|" style="left:351px; top:20px; width:95px; height:220px; ">
  113. <col ref="dd" format="yyyy-mm-dd"/>
  114. <script type="javascript" ev:event="onmousedown">
  115. <![CDATA[
  116. if(grd_choslist.isCell(event.target) && grd_choslist.mouserow >= grd_choslist.fixedrows)
  117. {
  118. //alert(1);
  119. fMouseRghtBtnPopupByItem();
  120. } else {
  121. initPopupMenu();
  122. }
  123. ]]>
  124. </script>
  125. </datagrid>
  126. <button id="btn_close" class="btn4_letter2" style="left:387px; top:243px; width:56px; height:22px; ">
  127. <caption>닫기</caption>
  128. <script type="javascript" ev:event="DOMActivate">
  129. <![CDATA[
  130. model.close();
  131. ]]>
  132. </script>
  133. </button>
  134. <button id="btn_confirm" class="btn4_letter2" style="left:329px; top:243px; width:56px; height:22px; ">
  135. <caption>확인</caption>
  136. <script type="javascript" ev:event="DOMActivate">
  137. <![CDATA[
  138. fConfBtn();
  139. ]]>
  140. </script>
  141. </button>
  142. <caption id="caption9" class="cell_1" style="left:0px; top:20px; width:350px; height:25px; text-align:center; "/>
  143. <output id="output1" ref="/root/hidden/calendar/month" style="left:182px; top:22px; width:30px; height:19px; "/>
  144. <button id="button1" class="icon_pre_year" style="left:83px; top:23px; width:16px; height:16px; ">
  145. <caption/>
  146. <script type="javascript" ev:event="DOMActivate">
  147. <![CDATA[
  148. var isMonth = model.getValue("/root/hidden/calendar/month");
  149. var isYear = model.getValue("/root/hidden/calendar/year");
  150. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
  151. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  152. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  153. model.refresh();
  154. setCalendar(isDate);
  155. ]]>
  156. </script>
  157. </button>
  158. <caption id="caption3" style="left:162px; top:22px; width:20px; height:19px; ">년</caption>
  159. <button id="button2" class="icon_next_year" style="left:258px; top:23px; width:16px; height:16px; ">
  160. <caption/>
  161. <script type="javascript" ev:event="DOMActivate">
  162. <![CDATA[
  163. var isMonth = model.getValue("/root/hidden/calendar/month");
  164. var isYear = model.getValue("/root/hidden/calendar/year");
  165. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
  166. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  167. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  168. model.refresh();
  169. setCalendar(isDate);
  170. ]]>
  171. </script>
  172. </button>
  173. <caption id="caption4" style="left:212px; top:22px; width:20px; height:19px; ">월</caption>
  174. <button id="button3" class="icon_pre_month" style="left:107px; top:23px; width:16px; height:16px; ">
  175. <caption/>
  176. <script type="javascript" ev:event="DOMActivate">
  177. <![CDATA[
  178. var isMonth = model.getValue("/root/hidden/calendar/month");
  179. var isYear = model.getValue("/root/hidden/calendar/year");
  180. var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
  181. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  182. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  183. model.refresh();
  184. setCalendar(isDate);
  185. ]]>
  186. </script>
  187. </button>
  188. <button id="button4" class="icon_next_month" style="left:235px; top:23px; width:16px; height:16px; ">
  189. <caption/>
  190. <script type="javascript" ev:event="DOMActivate">
  191. <![CDATA[
  192. var isMonth = model.getValue("/root/hidden/calendar/month");
  193. var isYear = model.getValue("/root/hidden/calendar/year");
  194. var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
  195. model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
  196. model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
  197. model.refresh();
  198. setCalendar(isDate);
  199. ]]>
  200. </script>
  201. </button>
  202. <output id="output2" ref="/root/hidden/calendar/year" style="left:132px; top:22px; width:30px; height:19px; "/>
  203. <line id="line1" class="line_1" style="x1:0px; y1:15px; x2:446px; y2:15px; "/>
  204. <caption id="captio11" class="tit_2" style="left:0px; top:0px; width:140px; height:13px; vertical-align:middle; ">미비일자</caption>
  205. </xhtml:body>
  206. </xhtml:html>