--- /dev/null
+<?xml version="1.0"?>\r
+<!DOCTYPE bindings \r
+[\r
+ <!ENTITY % dtd1 SYSTEM "chrome://ximfmail/locale/datepicker.dtd" > %dtd1; \r
+ \r
+]>\r
+<bindings \r
+ xmlns="http://www.mozilla.org/xbl"\r
+ xmlns:html="http://www.w3.org/1999/xhtml"\r
+ xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"\r
+ xmlns:xbl="http://www.mozilla.org/xbl">\r
+\r
+ <binding id="datepicker" extends="xul:box">\r
+ <resources>\r
+ <stylesheet src="chrome://ximfmail/content/datepicker/datepicker.css"/>\r
+ <script src="util.js"/>\r
+ </resources>\r
+\r
+ <content>\r
+ <xul:hbox class="textbox-input-box" flex="1" style="padding-right: 3px;" xbl:inherits="context">\r
+ <xul:hbox align="center" pack="center" flex="1">\r
+ <xul:textbox maxlength="17" anonid="input" flex="1" \r
+ xbl:inherits="class=txtclass,id,context,width,disabled,onfocus,onblur,value,type,maxlength,size,readonly,tabindex,accesskey"/> \r
+ </xul:hbox>\r
+ <xul:hbox pack="center" align="center" flex="0">\r
+ <xul:button id="datepicker-button" oncommand="openPopup(this)" position="after_start" />\r
+ </xul:hbox>\r
+\r
+ <xul:popup onpopupshowing="popupshowing(this)" \r
+ anonid="oe-date-picker-popup" \r
+ position="start_before" \r
+ oncommand="format(this, 'oe-date-picker-text-box')" value="">\r
+ <xul:vbox id="oe-date-picker-overlay-box" > \r
+ <xul:hbox id="oe-date-picker-year-controls-box" >\r
+ <xul:box flex="1">\r
+ <xul:image id="oe-date-picker-year-previous-jump-button" onclick="previousYearCommand(10)"/> \r
+ <xul:image id="oe-date-picker-year-previous-button" onclick="previousYearCommand(1)"/> \r
+ </xul:box>\r
+ <xul:label id="oe-date-picker-year-title-text" anonid="oe-date-picker-year-title-text" value="" /> \r
+ <xul:box flex="1" id="oe-date-picker-year-next-button-box" >\r
+ <xul:image id="oe-date-picker-year-next-button" onclick="nextYearCommand(1)"/>\r
+ <xul:image id="oe-date-picker-year-next-jump-button" onclick="nextYearCommand(10)"/>\r
+ </xul:box> \r
+ </xul:hbox> \r
+ \r
+ <xul:grid id="oe-date-picker-year-grid" flex="1">\r
+ <xul:columns>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </xul:columns>\r
+ <xul:rows >\r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" \r
+ anonid="oe-date-picker-year-month-1-box" \r
+ onclick="clickMonth(this, 1)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box ><xul:label class="oe-date-picker-year-month-name-class" value="&month.1.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-2-box" onclick="clickMonth(this, 2)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.2.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-3-box" onclick="clickMonth(this, 3)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.3.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-4-box" onclick="clickMonth(this, 4)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.4.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-5-box" onclick="clickMonth(this, 5)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.5.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-6-box" onclick="clickMonth(this, 6)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.6.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-7-box" onclick="clickMonth(this, 7)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.7.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-8-box" onclick="clickMonth(this, 8)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.8.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ <xul:row flex="1" >\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-9-box" onclick="clickMonth(this, 9)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.9.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-10-box" onclick="clickMonth(this, 10)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.10.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="oe-date-picker-year-month-11-box" onclick="clickMonth(this, 11)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.11.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" \r
+ anonid="oe-date-picker-year-month-12-box" \r
+ onclick="clickMonth(this, 12)" >\r
+ <xul:spacer flex="1" />\r
+ <xul:box><xul:label class="oe-date-picker-year-month-name-class" value="&month.12.MMM;" /></xul:box> \r
+ <xul:spacer flex="1" />\r
+ </xul:vbox> \r
+ </xul:row> \r
+ \r
+ \r
+ </xul:rows>\r
+ \r
+ </xul:grid>\r
+ \r
+ <xul:box id="oe-date-picker-month-grid-box" flex="1">\r
+ \r
+ <xul:grid id="oe-date-picker-month-grid" flex="1">\r
+ <xul:columns>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ </xul:columns>\r
+ <xul:rows>\r
+ \r
+ <xul:row id="oe-date-picker-month-days-header-box">\r
+ <xul:vbox class="oe-date-picker-month-days-header-class-red" anonid="oe-date-picker-month-day-1-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.1.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-2-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.2.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-3-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.3.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-4-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.4.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-5-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.5.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-6-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.6.DDD;" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-days-box-header-class" anonid="oe-date-picker-month-day-7-header-box">\r
+ <xul:label class="oe-date-picker-month-days-header-class" value="&day.7.DDD;" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-1-box" onclick="clickDay(this,1)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-1" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-2-box" onclick="clickDay(this,2)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-2" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-3-box" onclick="clickDay(this,3)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-3" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-4-box" onclick="clickDay(this,4)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-4" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-5-box" onclick="clickDay(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-5" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-6-box" onclick="clickDay(this,6)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-6" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-7-box" onclick="clickDay(this,7)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-7" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-8-box" onclick="clickDay(this,8)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-8" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-9-box" onclick="clickDay(this,9)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-9" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-10-box" onclick="clickDay(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-10" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-11-box" onclick="clickDay(this,11)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-11" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-12-box" onclick="clickDay(this,12)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-12" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-13-box" onclick="clickDay(this,13)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-13" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-14-box" onclick="clickDay(this,14)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-14" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-15-box" onclick="clickDay(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-15" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-16-box" onclick="clickDay(this,16)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-16" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-17-box" onclick="clickDay(this,17)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-17" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-18-box" onclick="clickDay(this,18)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-18" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-19-box" onclick="clickDay(this,19)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-19" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-20-box" onclick="clickDay(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-20" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-21-box" onclick="clickDay(this,21)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-21" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-22-box" onclick="clickDay(this,22)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-22" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-23-box" onclick="clickDay(this,23)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-23" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-24-box" onclick="clickDay(this,24)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-24" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-25-box" onclick="clickDay(this,25)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-25" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-26-box" onclick="clickDay(this,26)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-26" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-27-box" onclick="clickDay(this,27)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-27" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-28-box" onclick="clickDay(this,28)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-28" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-29-box" onclick="clickDay(this,29)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-29" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-30-box" onclick="clickDay(this,30)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-30" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-31-box" onclick="clickDay(this,31)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-31" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-32-box" onclick="clickDay(this,32)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-32" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-33-box" onclick="clickDay(this,33)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-33" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-34-box" onclick="clickDay(this,34)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-34" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-35-box" onclick="clickDay(this,35)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-35" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-36-box" onclick="clickDay(this,36)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-36" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-37-box" onclick="clickDay(this,37)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-37" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-38-box" onclick="clickDay(this,38)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-38" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-39-box" onclick="clickDay(this,39)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-39" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-40-box" onclick="clickDay(this,40)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-40" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-41-box" onclick="clickDay(this,41)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-41" value="" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="oe-date-picker-month-day-42-box" onclick="clickDay(this,42)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="oe-date-picker-month-day-text-42" value="" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ \r
+ </xul:rows>\r
+ </xul:grid>\r
+ </xul:box>\r
+ \r
+ <!-- EADS MODIFICATIONS -->\r
+ <!-- \r
+ <xul:hbox>\r
+ <xul:label value="TIME : " />\r
+ <xul:radiogroup orient="horizontal">\r
+ <xul:radio id="time12" label="12" onclick="clickHourRange(12)"/>\r
+ <xul:radio id="time24" label="24" onclick="clickHourRange(24)" selected="true"/>\r
+ </xul:radiogroup> \r
+ </xul:hbox>\r
+ -->\r
+ <xul:separator />\r
+ <xul:hbox><xul:label value="Heure"/></xul:hbox>\r
+ <xul:grid flex="1" id="ximfmail-date-picker-hour-grid">\r
+ <xul:columns>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ <xul:column class="oe-date-picker-year-column-class" flex="1"/>\r
+ </xul:columns>\r
+ \r
+ <xul:rows>\r
+ <!-- \r
+ <xul:row flex="1">\r
+ <xul:vbox class="oe-date-picker-year-month-box-class">\r
+ <xul:label value="Hour"/>\r
+ </xul:vbox> \r
+ </xul:row>\r
+ --> \r
+ <xul:row flex="1" anonid="ximfmail-date-picker-hour-12-header-box">\r
+ \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-0" onclick="clickHour(this,0)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-0" value="00" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-1" onclick="clickHour(this,1)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-1" value="01" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-2" onclick="clickHour(this,2)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-2" value="02" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-3" onclick="clickHour(this,3)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-3" value="03" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-4" onclick="clickHour(this,4)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-4" value="04" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-5" onclick="clickHour(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-5" value="05" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-6" onclick="clickHour(this,6)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-6" value="06" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-7" onclick="clickHour(this,7)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-7" value="07" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-8" onclick="clickHour(this,8)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-8" value="08" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-9" onclick="clickHour(this,9)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-9" value="09" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-10" onclick="clickHour(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-10" value="10" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-11" onclick="clickHour(this,11)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-11" value="11" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ <xul:row flex="1" anonid="ximfmail-date-picker-hour-24-header-box"> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-12" onclick="clickHour(this,12)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-12" value="12" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-13" onclick="clickHour(this,13)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-13" value="13" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-14" onclick="clickHour(this,14)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-14" value="14" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-15" onclick="clickHour(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-15" value="15" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-16" onclick="clickHour(this,16)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-16" value="16" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-17" onclick="clickHour(this,17)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-17" value="17" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-18" onclick="clickHour(this,18)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-18" value="18" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-19" onclick="clickHour(this,19)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-19" value="19" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-20" onclick="clickHour(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-20" value="20" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-21" onclick="clickHour(this,21)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-21" value="21" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-22" onclick="clickHour(this,22)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-22" value="22" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-year-month-box-class" anonid="ximfmail-date-picker-hour-box-23" onclick="clickHour(this,23)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-hour-text-23" value="23" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ </xul:rows>\r
+ </xul:grid> \r
+ <xul:hbox><xul:label value="Minutes"/></xul:hbox>\r
+ <xul:grid flex="1">\r
+ <xul:columns>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/>\r
+ <xul:column flex="1"/> \r
+ </xul:columns>\r
+ <xul:rows>\r
+ <!-- \r
+ <xul:row>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class">\r
+ <xul:label value="Min" />\r
+ </xul:vbox>\r
+ </xul:row>\r
+ -->\r
+ <xul:row id="ximfmail-date-picker-min-line1-header-box">\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-0" onclick="clickMin(this,0)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-0" value=":00" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-5" onclick="clickMin(this,5)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-5" value=":05" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-10" onclick="clickMin(this,10)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-10" value=":10" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-15" onclick="clickMin(this,15)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-15" value=":15" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-20" onclick="clickMin(this,20)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-20" value=":20" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-25" onclick="clickMin(this,25)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-25" value=":25" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ <xul:row id="ximfmail-date-picker-min-line2-header-box">\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-30" onclick="clickMin(this,30)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-30" value=":30" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-35" onclick="clickMin(this,35)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-35" value=":35" />\r
+ </xul:vbox> \r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-40" onclick="clickMin(this,40)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-40" value=":40" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-45" onclick="clickMin(this,45)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-45" value=":45" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-50" onclick="clickMin(this,50)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-50" value=":50" />\r
+ </xul:vbox>\r
+ <xul:vbox class="oe-date-picker-month-day-box-class" anonid="ximfmail-date-picker-min-box-55" onclick="clickMin(this,55)">\r
+ <xul:label class="oe-date-picker-month-day-number-class" anonid="ximfmail-date-picker-min-text-55" value=":55" />\r
+ </xul:vbox> \r
+ </xul:row>\r
+ </xul:rows>\r
+ </xul:grid> \r
+ <xul:hbox id="ximf-date-picker-end-controls-box">\r
+ <xul:box> \r
+ <xul:image id="oe-date-picker-currenttime-text" onclick="setToday()" /></xul:box> \r
+ <xul:box flex="1" />\r
+ <xul:box> <xul:image id="ximf-date-picker-ok-control-box" onclick="clickOk()"/>\r
+ </xul:box>\r
+ </xul:hbox>\r
+ </xul:vbox> \r
+ </xul:popup>\r
+ </xul:hbox>\r
+ </content>\r
+\r
+ <implementation>\r
+ <constructor>\r
+ <![CDATA[\r
+ // The popup window containing the picker\r
+ this.gPopup = null\r
+ \r
+ // The original starting date and currently selected date\r
+ this.gOriginalDate = null; \r
+ this.gSelectedDate = null; \r
+ \r
+ // selected items\r
+ this.gSelectedMonthItem = null;\r
+ this.gSelectedDayItem = null; \r
+ \r
+ this._input = document.getAnonymousElementByAttribute( this, "anonid", "input");\r
+ \r
+ var defaultDate = this.date;\r
+ if( defaultDate )\r
+ this.date = defaultDate;\r
+ \r
+ //EADS DS\r
+ this.gSelectedHoursItem = null;\r
+ this.gSelectedMinutesItem = null;\r
+ ]]>\r
+ </constructor> \r
+ <property name="date">\r
+ <getter>\r
+ if( this.hasAttribute( "date" ) ){\r
+ var val = this.getAttribute( "date" );\r
+ if( val == "now" )\r
+ return new Date();\r
+ else\r
+ return new Date( val );\r
+ }\r
+ else\r
+ return null;\r
+ </getter>\r
+ <setter>\r
+ if( val == "now" ){\r
+ this.setDate( new Date() );\r
+ this.setAttribute( "date", "now" );\r
+ }\r
+ else{\r
+ this.setDate( val );\r
+ this.setAttribute( "date", val.getTime() );\r
+ }\r
+ </setter>\r
+ </property>\r
+ <property name="disabled">\r
+ <getter>\r
+ return this._input.disabled;\r
+ </getter>\r
+ <setter>\r
+ this.setAttribute( "disabled", val );\r
+ this._input.disabled = val;\r
+ </setter>\r
+ </property>\r
+\r
+ <!-- see keypress example from mozilla/toolkit/content/widgets/autocomplete.xml -->\r
+ <method name="onKeyPress">\r
+ <parameter name="aEvent"/>\r
+ <body><![CDATA[\r
+ //XXX: this is so bogus...\r
+ if (aEvent.getPreventDefault())\r
+ return false;\r
+\r
+ if (aEvent.keyCode || aEvent.charCode <= 32 || aEvent.altKey || \r
+ aEvent.ctrlKey || aEvent.metaKey)\r
+ return true; // No printable char pressed, not a potential accesskey\r
+\r
+ var key = aEvent.which;\r
+ var keychar = String.fromCharCode( aEvent.which );//String.fromCharCode(key);\r
+\r
+ // control keys\r
+ if ((key==null) || (key==0) || (key==8) || \r
+ (key==9) || (key==13) || (key==27) ){\r
+ return true;\r
+ }\r
+\r
+ // numbers and a single decimal\r
+ if ((("-/0123456789").indexOf(keychar) > -1)){\r
+ return true;\r
+ }\r
+ \r
+ // blocking event\r
+ aEvent.stopPropagation();\r
+ aEvent.preventDefault();\r
+ return false;\r
+ ]]>\r
+ </body>\r
+ </method>\r
+ <method name="popupshowing">\r
+ <parameter name="popup"/>\r
+ <body><![CDATA[\r
+ // Set up the picker, called when the popup pops\r
+ this.gPopup = popup;\r
+\r
+ // get the start date from the popup value attribute and select it \r
+ var startDate = this.gPopup.value; \r
+ \r
+ if(startDate){ \r
+ this.gOriginalDate = new Date( startDate );\r
+ this.gSelectedDate = new Date( startDate );\r
+ }else{\r
+ this.gOriginalDate = new Date();\r
+ this.gSelectedDate = new Date();\r
+ this.gSelectedDate.setMinutes(Math.round((this.gSelectedDate.getMinutes()/5))*5); \r
+ this.gOriginalDate.setMinutes(Math.round((this.gOriginalDate.getMinutes()/5))*5); \r
+ }\r
+ \r
+ // draw the year based on the selected date\r
+ this.redrawYear();\r
+\r
+ // draw the month based on the selected date\r
+ var month = this.gSelectedDate.getMonth() + 1;\r
+ var selectedMonthBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-month-" + month + "-box" );\r
+ this.selectMonthItem( selectedMonthBoxItem );\r
+\r
+ // draw in the days for the selected date\r
+ this.redrawDays();\r
+ \r
+ //EADS - draw in hours and minutes for selected date\r
+ var hour = this.gSelectedDate.getHours();\r
+ var selectedHoursBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-box-" + hour );\r
+ this.selectHoursItem(selectedHoursBoxItem);\r
+ \r
+ var min = this.gSelectedDate.getMinutes();\r
+ var selectedMinutesBoxItem = null;\r
+ if(min%5 != 0)\r
+ selectedMinutesBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + (Math.round(min/5)*5) );\r
+ else\r
+ selectedMinutesBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + min );\r
+ this.selectMinutesItem(selectedMinutesBoxItem); \r
+ ]]></body>\r
+ </method>\r
+ \r
+ <method name="clickDay">\r
+ <parameter name="newDayItem"/>\r
+ <parameter name="newDayItemNumber"/>\r
+ <body><![CDATA[\r
+ // Called when a day is clicked, close the picker and call the client's oncommand\r
+ // get the clicked day\r
+ \r
+ var dayNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-text-" + newDayItemNumber );\r
+\r
+ var dayNumber = dayNumberItem.getAttribute( "value" );\r
+\r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+\r
+ if( dayNumber != "" ){ \r
+ this.selectDayItem(newDayItem);\r
+ // set the selected date to what they cliked on\r
+ this.gSelectedDate.setDate( dayNumber ); \r
+ this.selectDate();\r
+\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectDate">\r
+ <body><![CDATA[\r
+ // We copy the picked date to avoid problems with changing the Date object in place\r
+ \r
+ var pickedDate = new Date( this.gSelectedDate );\r
+\r
+ // put the selected date in the popup item's value property\r
+\r
+ this.gPopup.value = pickedDate;\r
+\r
+ // get the client oncommand function, call it if there is one\r
+\r
+ var commandEventMethod = this.gPopup.getAttribute( "oncommand" );\r
+\r
+ if( commandEventMethod != null )\r
+ {\r
+ // set up a variable date, that will be avaialable from within the \r
+ // client method\r
+\r
+ var date = pickedDate;\r
+\r
+ // Make the function a member of the popup before calling it so that \r
+ // 'this' will be the popup\r
+\r
+ this.gPopup._input = this._input; // save the input\r
+ var input = this._input;\r
+\r
+ this.gPopup.oeDatePickerFunction = function(){\r
+ var datePopup = this;\r
+ var newDate = datePopup.value;\r
+ var day = newDate.getDate();\r
+ if(day < 10){day = "0" + day;}\r
+ var month = newDate.getMonth() + 1;\r
+ if(month < 10){month = "0" + month;}\r
+ var hour = newDate.getHours();\r
+ if(hour < 10){hour = "0"+ hour;}\r
+ var min = newDate.getMinutes();\r
+ if(min < 10){min = "0" + min;}\r
+\r
+ this._input.value = day + "/" + month + "/" + newDate.getFullYear() + " " + hour + ":" + min;\r
+ \r
+ };\r
+ \r
+ this.gPopup.oeDatePickerFunction();\r
+ }\r
+\r
+ // close the popup\r
+ //this.gPopup.closePopup();\r
+ ]]></body>\r
+ </method>\r
+ <method name="clickMonth">\r
+ <parameter name="newMonthItem"/>\r
+ <parameter name="newMonthNumber"/>\r
+ <body><![CDATA[\r
+ // Called when a month box is clicked \r
+ // already selected, return\r
+ if( this.gSelectedMonthItem == newMonthItem )\r
+ return;\r
+\r
+ // Avoid problems when changing months if the date is at the end of the month\r
+ // i.e. if date is 31 march and you do a setmonth to april, the month would\r
+ // actually be set to may, beacause april only has 30 days.\r
+ // This is why we keep the original date around.\r
+\r
+ var oldDate = this.gSelectedDate.getDate();\r
+ var yearNumber = this.gSelectedDate.getFullYear();\r
+\r
+ var pastLastDate = new Date( yearNumber, newMonthNumber-1, 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate(); \r
+\r
+ if( oldDate > lastDayOfMonth ){\r
+ this.gSelectedDate.setDate(lastDayOfMonth);\r
+ }\r
+\r
+ // update the selected date\r
+ this.gSelectedDate.setMonth( newMonthNumber - 1 );\r
+\r
+ // select Month\r
+ this.selectMonthItem( newMonthItem );\r
+\r
+ // redraw days\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="previousYearCommand">\r
+ <parameter name="increment"/>\r
+ <body><![CDATA[\r
+ // Called when previous Year button is clicked \r
+ // update the selected date\r
+\r
+ var oldYear = this.gSelectedDate.getFullYear(); \r
+ this.gSelectedDate.setFullYear( oldYear - increment ); \r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="setToday">\r
+ <body><![CDATA[\r
+ this.gSelectedDate = new Date();\r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ \r
+ //select new month item\r
+ var newMonth = this.gSelectedDate.getMonth(); \r
+ var monthItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-month-" + (newMonth+1) + "-box");\r
+ this.selectMonthItem(monthItem); \r
+ \r
+ // select new hours item \r
+ var newHour = this.gSelectedDate.getHours(); \r
+ var hourNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-box-" + newHour );\r
+ this.selectHoursItem(hourNumberItem);\r
+ \r
+ // select new minutes item\r
+ this.gSelectedDate.setMinutes(Math.round((this.gSelectedDate.getMinutes()/5))*5); \r
+ var newMinutes = this.gSelectedDate.getMinutes(); \r
+ var minutesNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-box-" + newMinutes );\r
+ this.selectMinutesItem(minutesNumberItem); \r
+ \r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="nextYearCommand">\r
+ <parameter name="increment"/>\r
+ <body><![CDATA[\r
+ // Called when next Year button is clicked \r
+ // update the selected date\r
+\r
+ var oldYear = this.gSelectedDate.getFullYear(); \r
+ this.gSelectedDate.setFullYear( oldYear + increment ); \r
+\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ ]]></body>\r
+ </method>\r
+ <method name="redrawYear">\r
+ <body><![CDATA[\r
+ var yearTitleItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-year-title-text" );\r
+ yearTitleItem.setAttribute( "value", this.gSelectedDate.getFullYear() );\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="selectMonthItem">\r
+ <parameter name="newMonthItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedMonthItem != null ){\r
+ this.gSelectedMonthItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newMonthItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedMonthItem = newMonthItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectDayItem">\r
+ <parameter name="newDayItem"/>\r
+ <body><![CDATA[\r
+ // Select a day box \r
+ // clear old selection, if there is one\r
+\r
+ if( this.gSelectedDayItem != null ){\r
+ this.gSelectedDayItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ if( newDayItem != null ){\r
+ // Set the selected attribute, used to give it a different style\r
+ newDayItem.setAttribute( "selected" , true );\r
+ }\r
+ // Remember new selection\r
+ this.gSelectedDayItem = newDayItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="redrawDays">\r
+ <body><![CDATA[\r
+ // Redraw day numbers based on the selected date\r
+ // Write in all the day numbers\r
+ \r
+ var firstDate = new Date( this.gSelectedDate.getFullYear(), this.gSelectedDate.getMonth(), 1 );\r
+ var firstDayOfWeek = firstDate.getDay();\r
+ \r
+ //get last Day Of Month \r
+ var pastLastDate = new Date( this.gSelectedDate.getFullYear(), this.gSelectedDate.getMonth(), 32 );\r
+ var lastDayOfMonth = 32 - pastLastDate.getDate(); \r
+ \r
+ // clear the selected day item \r
+ this.selectDayItem( null );\r
+ \r
+ // redraw each day bax in the 7 x 6 grid\r
+ \r
+ var dayNumber = 1;\r
+ \r
+ for( var dayIndex = 0; dayIndex < 42; ++dayIndex )\r
+ {\r
+ // get the day text box\r
+ \r
+ var dayNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-text-" + (dayIndex + 1) );\r
+ \r
+ // if it is an unfilled day ( before first or after last ), just set its value to "",\r
+ // and don't increment the day number.\r
+ \r
+ if( dayIndex < firstDayOfWeek || dayNumber > lastDayOfMonth )\r
+ {\r
+ dayNumberItem.setAttribute( "value" , "" ); \r
+ }\r
+ else\r
+ {\r
+ // set the value to the day number\r
+ \r
+ dayNumberItem.setAttribute( "value" , dayNumber );\r
+ \r
+ // draw the day as selected\r
+ if( dayNumber == this.gSelectedDate.getDate() ) \r
+ {\r
+ var dayNumberBoxItem = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-month-day-" + (dayIndex + 1) + "-box" );\r
+ this.selectDayItem( dayNumberBoxItem );\r
+ }\r
+ \r
+ // advance the day number\r
+ \r
+ ++dayNumber; \r
+ }\r
+ }\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="openPopup">\r
+ <parameter name="button"/>\r
+ <body><![CDATA[\r
+ var datestr = this._input.value;\r
+ var datePickerPopup = document.getAnonymousElementByAttribute( this, "anonid", "oe-date-picker-popup" );\r
+ var date = this.parseDate( datestr );\r
+ if( !date )\r
+ date = new Date();\r
+\r
+ datePickerPopup.setAttribute( "value", date );\r
+ // XXX: is there a better way to offset the popup then hard coding 25?\r
+ //datePickerPopup.showPopup( button, button.boxObject.screenX,(button.boxObject.screenY + 25), "popup" );\r
+ datePickerPopup.showPopup( button, -1, -1, "popup" );\r
+ ]]></body>\r
+ </method>\r
+ <method name="parseDate">\r
+ <parameter name="datestr"/>\r
+ <body><![CDATA[\r
+ //var datestr = this._input.value; \r
+ try{\r
+ if( datestr != "" ){\r
+ var reg=new RegExp("[ / :]+", "g"); //eads\r
+ var parts = datestr.split(reg); \r
+ if( parts.length >= 5 ){ \r
+ //var d = new Date(month, day, year, hour, minutes, seconds);\r
+ //return new Date(parseInt(parts[1]-1),parseInt(parts[0]),parseInt(parts[2]),parseInt(parts[3]),parseInt(parts[4]),0);\r
+ alert("SPLIT DATE\nmonth : "+parts[1] + "\n day : " + parts[0] +"\n year : "+ parts[2] +"\n hour : "+ parts[3] +"\n min : "+ parts[4]);\r
+ var new_date = new Date();\r
+ new_date.setDate(parseInt(parts[0], 10));\r
+ new_date.setMonth(parseInt(parts[1]-1, 10));\r
+ new_date.setFullYear(parseInt(parts[2], 10));\r
+ new_date.setHours(parseInt(parts[3], 10));\r
+ new_date.setMinutes(parseInt(parts[4], 10));\r
+ new_date.setSeconds(0);\r
+ return new_date; \r
+ }\r
+ }\r
+ }catch(e){}\r
+ return null;\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="getDate">\r
+ <body><![CDATA[\r
+ return this.parseDate( this._input.value );\r
+ ]]></body>\r
+ </method>\r
+ <method name="setDate">\r
+ <parameter name="date"/>\r
+ <body><![CDATA[\r
+ if( !date )\r
+ return;\r
+\r
+ try{\r
+ this.gSelectedDate = date;\r
+ this._input.value = date.getDate() + "/" + (date.getMonth()+1) + "/" + date.getFullYear() + " " + date.getHours() + ":" + date.getMinutes();\r
+ }catch( e ){\r
+ // try parsing the date as a string \r
+ this.gSelectedDate = this.parseDate( date );\r
+ if( this.gSelectedDate )\r
+ this._input.value = date;\r
+ else{\r
+ dump( "Date is invalid: " + date + "\n" );\r
+ alert( "Date is invalid: " + date + "\n" );\r
+ return;\r
+ }\r
+ }\r
+ if( this.gPopup ){\r
+ // redraw the year and the days\r
+ this.redrawYear();\r
+ this.redrawDays();\r
+ this.selectDate();\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <property name="value">\r
+ <getter>\r
+ return this.getDate();\r
+ </getter>\r
+ <setter>\r
+ this.setDate(val);\r
+ </setter>\r
+ </property>\r
+ <!-- EADS BEGIN -->\r
+ <method name="clickHour">\r
+ <parameter name="newHoursItem"/>\r
+ <parameter name="newHourItemNumber"/>\r
+ <body><![CDATA[ \r
+ var hourNumberItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-text-" + newHourItemNumber );\r
+ var hourNumber = hourNumberItem.getAttribute( "value" ); \r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+ if( hourNumber != "" ){ \r
+ \r
+ this.selectHoursItem(newHoursItem);\r
+ \r
+ //bug on 8 and 9 ParseInt hourNumber\r
+ //alert(hourNumber +" .. " + parseInt(hourNumber)+">>"+this.gSelectedDate.getHours());\r
+ \r
+ //var iHour = 0; parseInt(hourNumber);\r
+ //if(hourNumber=="08"){\r
+ // iHour = 8;\r
+ //}else{\r
+ // if(hourNumber=="09"){\r
+ // iHour = 9;\r
+ // }else{\r
+ // iHour = parseInt(hourNumber);\r
+ // }\r
+ //}\r
+ \r
+ //this.gSelectedDate.setHours(iHour);\r
+ this.gSelectedDate.setHours(parseInt(hourNumber, 10)); \r
+ this.selectDate();\r
+ \r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <method name="selectHoursItem">\r
+ <parameter name="newHoursItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedHoursItem != null ){\r
+ this.gSelectedHoursItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newHoursItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedHoursItem = newHoursItem;\r
+ ]]></body>\r
+ </method>\r
+ <method name="clickMin">\r
+ <parameter name="newMinItem"/>\r
+ <parameter name="newMinItemNumber"/>\r
+ <body><![CDATA[ \r
+ var minItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-min-text-" + newMinItemNumber );\r
+ var minNumber = minItem.getAttribute( "value" );\r
+ \r
+ // they may have clicked an unfilled day, if so ignore it and leave the picker up\r
+ if( minNumber != "" ){\r
+ //\r
+ this.selectMinutesItem(newMinItem);\r
+ //\r
+ \r
+ this.gSelectedDate.setMinutes(parseInt(newMinItemNumber, 10)); \r
+ this.selectDate(); \r
+ }\r
+ ]]></body>\r
+ </method>\r
+\r
+ <method name="selectMinutesItem">\r
+ <parameter name="newMinutesItem"/>\r
+ <body><![CDATA[\r
+ // Select a month box \r
+ // clear old selection, if there is one\r
+ if( this.gSelectedMinutesItem != null ){\r
+ this.gSelectedMinutesItem.setAttribute( "selected" , false );\r
+ }\r
+\r
+ // Set the selected attribute, used to give it a different style\r
+ newMinutesItem.setAttribute( "selected" , true );\r
+\r
+ // Remember new selection\r
+ this.gSelectedMinutesItem = newMinutesItem;\r
+ ]]></body>\r
+ </method> \r
+ <method name="clickOk">\r
+ <body><![CDATA[\r
+ this.selectDate();\r
+ this.gPopup.hidePopup();\r
+ ]]></body>\r
+ </method>\r
+ \r
+ <method name="clickHourRange"> \r
+ <parameter name="newValueNumber"/>\r
+ <body><![CDATA[\r
+ var rowItem = document.getAnonymousElementByAttribute( this, "anonid", "ximfmail-date-picker-hour-24-header-box" );\r
+ if(newValueNumber == "12"){ \r
+ //rowItem.setAttribute("hidden","true");\r
+ rowItem.style.display="none";\r
+ }else{\r
+ //rowItem.setAttribute("hidden","false");\r
+ rowItem.style.display="";\r
+ }\r
+ ]]></body>\r
+ </method>\r
+ <!-- EADS END -->\r
+ </implementation> \r
+ <handlers> \r
+ <handler event="keypress" phase="capturing" action="return this.onKeyPress(event);"/>\r
+ </handlers>\r
+ </binding>\r
+</bindings>\r