123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.5">
- <TypeDefinition url="..\default_typedef.xml"/>
- <Form id="dl_monthCalendar" classname="CommonBtn" inheritanceid="" position="absolute 0 0 170 180" titletext="monthCalendar" scrollbars="none">
- <Layouts>
- <Layout>
- <Static id="stc_31" class="St_popupBg02" enable="false" position="absolute 0 0 171 180"/>
- <Button id="btnM1" taborder="1" onclick="btnM_onclick" class="btn_m01" position="absolute 14 45 49 85" tabstop="false"/>
- <Button id="btnM2" taborder="1" onclick="btnM_onclick" class="btn_m02" position="absolute 50 45 85 85" tabstop="false"/>
- <Button id="btnM3" taborder="1" onclick="btnM_onclick" class="btn_m03" position="absolute 86 45 121 85" tabstop="false"/>
- <Button id="btnM4" taborder="1" onclick="btnM_onclick" class="btn_m04" position="absolute 122 45 157 85" tabstop="false"/>
- <Button id="btnM8" taborder="1" onclick="btnM_onclick" class="btn_m08" position="absolute 122 86 157 126" tabstop="false"/>
- <Button id="btnM7" taborder="1" onclick="btnM_onclick" class="btn_m07" position="absolute 86 86 121 126" tabstop="false"/>
- <Button id="btnM6" taborder="1" onclick="btnM_onclick" class="btn_m06" position="absolute 50 86 85 126" tabstop="false"/>
- <Button id="btnM5" taborder="1" onclick="btnM_onclick" class="btn_m05" position="absolute 14 86 49 126" tabstop="false"/>
- <Button id="btnM9" taborder="1" onclick="btnM_onclick" class="btn_m09" position="absolute 14 127 49 167" tabstop="false"/>
- <Button id="btnM10" taborder="1" onclick="btnM_onclick" class="btn_m10" position="absolute 50 127 85 167" tabstop="false"/>
- <Button id="btnM11" taborder="1" onclick="btnM_onclick" class="btn_m11" position="absolute 86 127 121 167" tabstop="false"/>
- <Button id="btnM12" taborder="1" onclick="btnM_onclick" class="btn_m12" position="absolute 122 127 157 167" tabstop="false"/>
- <Static id="Static05" class="sta_Month" position="absolute 1 1 170 33"/>
- <Button id="btn_PreYear" taborder="1" onclick="btn_PreYear_onclick" class="btn_MonthP" position="absolute 33 7 53 27" tabstop="false"/>
- <Button id="btn_NextYear" taborder="1" onclick="btn_NextYear_onclick" class="btn_MonthN" position="absolute 118 7 138 27" tabstop="false"/>
- <Static id="stcYear" text="2012" class="sta_Month_Year" position="absolute 55 9 115 24"/>
- </Layout>
- </Layouts>
- <Objects>
- <Dataset id="dstMonth" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
- <ColumnInfo>
- <Column id="code" type="INT" size="2"/>
- <Column id="name" type="STRING" size="256"/>
- </ColumnInfo>
- <Rows>
- <Row>
- <Col id="code">1</Col>
- <Col id="name">Jan</Col>
- </Row>
- <Row>
- <Col id="code">2</Col>
- <Col id="name">Feb</Col>
- </Row>
- <Row>
- <Col id="code">3</Col>
- <Col id="name">Mar</Col>
- </Row>
- <Row>
- <Col id="code">4</Col>
- <Col id="name">Apr</Col>
- </Row>
- <Row>
- <Col id="code">5</Col>
- <Col id="name">May</Col>
- </Row>
- <Row>
- <Col id="code">6</Col>
- <Col id="name">Jun</Col>
- </Row>
- <Row>
- <Col id="code">7</Col>
- <Col id="name">Jul</Col>
- </Row>
- <Row>
- <Col id="code">8</Col>
- <Col id="name">Aug</Col>
- </Row>
- <Row>
- <Col id="code">9</Col>
- <Col id="name">Sep</Col>
- </Row>
- <Row>
- <Col id="code">10</Col>
- <Col id="name">Oct</Col>
- </Row>
- <Row>
- <Col id="code">11</Col>
- <Col id="name">Nov</Col>
- </Row>
- <Row>
- <Col id="code">12</Col>
- <Col id="name">Dec</Col>
- </Row>
- </Rows>
- </Dataset>
- </Objects>
- <Script type="xscript4.0"><![CDATA[/***************************************************************************************
- * System Name : KMTC
- * Job Name : Composite to Div
- * File Name : dl_monthCalendar.xfdl
- * Creator : TOBESOFT
- * Make Date : 2013.01.18
- *
- * Description : Calendar Month Select Composite
- *---------------------------------------------------------------------------------------
- * Modify Date Modifier Modify Description
- *---------------------------------------------------------------------------------------
- * 2013.01.18 TOBESOFT Initial Make Program
- *
- *---------------------------------------------------------------------------------------
- ****************************************************************************************/
- //=======================================================================================
- // Common Lib Include
- //---------------------------------------------------------------------------------------
- //include "Lib::xCommon.xjs";
- //=======================================================================================
- // Global Form Variable
- //---------------------------------------------------------------------------------------
- var iv_mvArgValue;
- var iv_msPreMonth;
- /****************************************************************************************
- * Description : Form Initialization
- * Argument : obj : Object Event has occurred
- * : e : Event Object
- * return :
- ****************************************************************************************/
- //=======================================================================================
- // Event
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected month
- ****************************************************************************************/
- function btnM_onclick(obj:Button, e:ClickEventInfo)
- {
- var aDate = new Array(3);
- var strDate = stcYear.text + obj.name.replace("btnM","").padLeft(2, "0");
- aDate[0] = strDate;
- aDate[1] = strDate + "01";
- aDate[2] = strDate + ufn_getMonthLastDay(strDate);
-
- closePopup(aDate);
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected next year
- ****************************************************************************************/
- function btn_NextYear_onclick(obj:Button, e:ClickEventInfo)
- {
- var strYY = stcYear.text;
- stcYear.text = (parseInt(strYY) + 1).toString();
- strYY = stcYear.text;
- fn_SetCalendar(strYY,"");
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected prev year
- ****************************************************************************************/
- function btn_PreYear_onclick(obj:Button, e:ClickEventInfo)
- {
- var strYY = stcYear.text;
- stcYear.text = (parseInt(strYY) - 1).toString();
- strYY = stcYear.text;
-
- fn_SetCalendar(strYY,"");
- }
- /****************************************************************************************
- * Components : Button
- * Event : onclick
- * Argument : 01.obj : Object Event has occurred
- * : 02.e : Event Object
- * Description : Selected close Button
- ****************************************************************************************/
- function btn_Close_onclick(obj:Button, e:ClickEventInfo)
- {
- closePopup();
- }
- //=======================================================================================
- // User Function
- //---------------------------------------------------------------------------------------
- /****************************************************************************************
- * Description : Last day of the month
- * Argument : sMonth 'yyyyMMdd'
- * return : 'yyyyMMdd'
- ****************************************************************************************/
- function ufn_getMonthLastDay(sMonth)
- {
- var iLastDay;
- var iYear = parseInt(String(sMonth).substr(0, 4),10) ;
- var iMonth = parseInt(String(sMonth).substr(4, 2),10);
- switch(iMonth)
- {
- case 2 :
- if( ((iYear%4)==0) && ((iYear%100)!=0) || ((iYear%400)==0) )
- iLastDay = 29;
- else
- iLastDay = 28;
- break;
- case 4 :
- case 6 :
- case 9 :
- case 11 :
- iLastDay = 30;
- break;
- default:
- iLastDay = 31;
- break;
- }
-
- return iLastDay;
- }
- /****************************************************************************************
- * Description : Load calendar of day
- * Argument : none
- * return : none
- ****************************************************************************************/
- function fn_SetCalendar(strYY,strMM)
- {
- var obj;
- var strId;
-
- if(strMM.trim().length == 0) return;
- // Set color
- stcYear.text = strYY;
- obj = eval("btnM" + parseInt(strMM));
- var nRow = dstMonth.findRow("code", parseInt(strMM));
-
- if(nRow == 0){
- obj.style.background.image = "URL('theme://images/img_Month01_S.png')";
- } else if(nRow == 1){
- obj.style.background.image = "URL('theme://images/img_Month02_S.png')";
- } else if(nRow == 2){
- obj.style.background.image = "URL('theme://images/img_Month03_S.png')";
- } else if(nRow == 3){
- obj.style.background.image = "URL('theme://images/img_Month04_S.png')";
- } else if(nRow == 4){
- obj.style.background.image = "URL('theme://images/img_Month05_S.png')";
- } else if(nRow == 5){
- obj.style.background.image = "URL('theme://images/img_Month06_S.png')";
- } else if(nRow == 6){
- obj.style.background.image = "URL('theme://images/img_Month07_S.png')";
- } else if(nRow == 7){
- obj.style.background.image = "URL('theme://images/img_Month08_S.png')";
- } else if(nRow == 8){
- obj.style.background.image = "URL('theme://images/img_Month09_S.png')";
- } else if(nRow == 9){
- obj.style.background.image = "URL('theme://images/img_Month10_S.png')";
- } else if(nRow == 10){
- obj.style.background.image = "URL('theme://images/img_Month11_S.png')";
- } else if(nRow == 11){
- obj.style.background.image = "URL('theme://images/img_Month12_S.png')";
- }
-
- iv_msPreMonth = parseInt(strMM);
- }
- function fn_CrCal(strDate)
- {
- iv_mvArgValue = strDate;
- var strYY = iv_mvArgValue.substr(0,4);
- var strMM = iv_mvArgValue.substr(4,2);
-
- fn_SetCalendar(strYY,strMM);
- }
- ]]></Script>
- </Form>
- </FDL>
|