123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229 |
- <?xml version="1.0" encoding="UTF-16"?>
- <?xml-stylesheet href="../../../com/commonweb/css/common.css" type="text/css" ?>
- <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">
- <xhtml:head>
- <xhtml:title>미비날짜선택</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <hidden>
- <calendar>
- <year/>
- <month/>
- <weeklist>
- <list>
- <sun/>
- <mon/>
- <tue/>
- <wed/>
- <thu/>
- <fri/>
- <sat/>
- <sun_memo/>
- <mon_memo/>
- <tue_memo/>
- <wed_memo/>
- <thu_memo/>
- <fri_memo/>
- <sat_memo/>
- </list>
- </weeklist>
- </calendar>
- </hidden>
- <main>
- <chos>
- <chosdd/>
- </chos>
- </main>
- <init>
- <menu>
- <menu>
- <label>삭제</label>
- <func>fDelChosList</func>
- </menu>
- </menu>
- </init>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </model>
- <script type="javascript">
- <![CDATA[
-
- function setCalendar(dateObj) {
-
- // 그리드 초기화
- model.removeNodeset("/root/hidden/calendar/weeklist/list");
- //grd_calendar.rebuild()
-
- dateObj.setDate(1);
- var startDay = dateObj.getDay();
- var days = dateObj.getMonthDay();
-
- var rows = Math.ceil( ( startDay + days ) / 7 );
- for( var i = 0; i < rows; i++ )
- grd_calendar.addRow(false);
-
- grd_calendar.rebuild();
- var rowIndex = grd_calendar.fixedRows;
- var colIndex = startDay;
- for( var i = 1; i <= days; i++ ) {
- grd_calendar.valueMatrix(rowIndex, colIndex) = i;
- colIndex++;
- if( colIndex == 7 ) {
- colIndex = 0;
- rowIndex++;
- }
- }
- }
-
- function setCellColor(gridObj) {
-
- var calRow = gridObj.row;
- var calCol = gridObj.col;
- var tmpCalCol;
-
- if( calCol < 7 )
- tmpCalCol = calCol + 7;
- else
- tmpCalCol = calCol - 7;
-
- //gridObj.rebuildStyle();
-
- //gridObj.cellStyle("background-color", calRow, calCol) = "#ece1ec";
-
-
- gridObj.cellStyle("background-color", calRow, tmpCalCol) = "#daa7d9";
- }
- ]]>
- </script>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../emr/unprepmngtweb/js/SPMRI02500.js"/>
- </xhtml:head>
- <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; ">
- <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; ">
- <col class="color_sun" ref="sun" style="border-bottom-width:1px; "/>
- <col ref="mon" style="border-bottom-width:1px; "/>
- <col ref="tue" style="border-bottom-width:1px; "/>
- <col ref="wed" style="border-bottom-width:1px; "/>
- <col ref="thu" style="border-bottom-width:1px; "/>
- <col ref="fri" style="border-bottom-width:1px; "/>
- <col class="color_sat" ref="sat" style="border-bottom-width:1px; "/>
- <script type="javascript" ev:event="onclick">
- <![CDATA[
-
- fAddGrdChoiDD();
- ]]>
- </script>
- </datagrid>
- <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; ">
- <col ref="dd" format="yyyy-mm-dd"/>
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
-
- if(grd_choslist.isCell(event.target) && grd_choslist.mouserow >= grd_choslist.fixedrows)
- {
- //alert(1);
- fMouseRghtBtnPopupByItem();
- } else {
- initPopupMenu();
- }
- ]]>
- </script>
- </datagrid>
- <button id="btn_close" class="btn4_letter2" style="left:387px; top:243px; width:56px; height:22px; ">
- <caption>닫기</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.close();
- ]]>
- </script>
- </button>
- <button id="btn_confirm" class="btn4_letter2" style="left:329px; top:243px; width:56px; height:22px; ">
- <caption>확인</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fConfBtn();
- ]]>
- </script>
- </button>
- <caption id="caption9" class="cell_1" style="left:0px; top:20px; width:350px; height:25px; text-align:center; "/>
- <output id="output1" ref="/root/hidden/calendar/month" style="left:182px; top:22px; width:30px; height:19px; "/>
- <button id="button1" class="icon_pre_year" style="left:83px; top:23px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'Y');
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- setCalendar(isDate);
- ]]>
- </script>
- </button>
- <caption id="caption3" style="left:162px; top:22px; width:20px; height:19px; ">년</caption>
- <button id="button2" class="icon_next_year" style="left:258px; top:23px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'Y');
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- setCalendar(isDate);
- ]]>
- </script>
- </button>
- <caption id="caption4" style="left:212px; top:22px; width:20px; height:19px; ">월</caption>
- <button id="button3" class="icon_pre_month" style="left:107px; top:23px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(-1,'M');
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- setCalendar(isDate);
- ]]>
- </script>
- </button>
- <button id="button4" class="icon_next_month" style="left:235px; top:23px; width:16px; height:16px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var isMonth = model.getValue("/root/hidden/calendar/month");
- var isYear = model.getValue("/root/hidden/calendar/year");
- var isDate = (isYear+isMonth+1).toDate().getAddDate(1,'M');
- model.setValue("/root/hidden/calendar/year", isDate.getDateFormat('YYYY'));
- model.setValue("/root/hidden/calendar/month", isDate.getDateFormat('MM'));
- model.refresh();
- setCalendar(isDate);
- ]]>
- </script>
- </button>
- <output id="output2" ref="/root/hidden/calendar/year" style="left:132px; top:22px; width:30px; height:19px; "/>
- <line id="line1" class="line_1" style="x1:0px; y1:15px; x2:446px; y2:15px; "/>
- <caption id="captio11" class="tit_2" style="left:0px; top:0px; width:140px; height:13px; vertical-align:middle; ">미비일자</caption>
- </xhtml:body>
- </xhtml:html>
|