index aee1ea51b002a5bd04a863345052379ed2f1f73f..2c6d0e6962ecfc31be0104c128a2ff885569145c 100644 (file)
this._div.innerHTML = '<div class="datepicker-header"><table class="header" cellspacing="0"><tr><td id="'+ this._id_datepicker_prev_year +'" class="prev_year"> << </td><td id="'+ this._id_datepicker_prev +'" class="prev"> < </td><td id="'+ this._id_datepicker_hdr +'" class="header"></td><td id="'+ this._id_datepicker_next +'" class="next"> > </td><td id="'+ this._id_datepicker_next_year +'" class="next_year"> >> </td></tr></table></div><div class="datepicker-calendar"><table class="body"><tbody id="'+ this._id_datepicker +'-tbody"></tbody></table></div><div id="'+ this._id_datepicker_ftr +'" class="datepicker-footer"></div>';
/* Build the datepicker icon */
- var datepickeropener = Builder.node('table',{className : "datepicker-opener-table"});
-
+ var datepickeropener = Builder.node('table',{className : "datepicker-opener-table", id: this._id_datepicker + '_image'});
var con = Builder.node('tr',{},[
Builder.node('td',{className : "datepicker-opener", id : "datepicker-opener-"+ this._relative})
]);
/* hack for buggy form elements layering in IE */
_wrap_in_iframe : function ( content ) {
- return ( Prototype.Browser.IE ) ? "<div style='height:167px;width:185px;background-color:white;align:left'><iframe width='100%' height='100%' marginwidth='0' marginheight='0' frameborder='0' src='about:blank' style='filter:alpha(Opacity=50);'></iframe><div style='position:absolute;background-color:white;top:2px;left:2px;width:180px'>" + content + "</div></div>" : content;
+ return ( Prototype.Browser.IE && msieversion() < 8 ) ? "<div style='height:167px;width:185px;background-color:white;align:left'><iframe width='100%' height='100%' marginwidth='0' marginheight='0' frameborder='0' src='about:blank' style='filter:alpha(Opacity=50);'></iframe><div style='position:absolute;background-color:white;top:2px;left:2px;width:180px'>" + content + "</div></div>" : content;
},
/**
/* init the datepicker if it doesn't exists */
if ( $(this._id_datepicker) == null ) this.load();
+ var a_pos = Element.cumulativeOffset($(this._relative));
+ this.setPosition(a_pos[1], a_pos[0]);
if (!this._isPositionned && this._relativePosition) {
/* position the datepicker relatively to element */
var a_lt = Element.positionedOffset($(this._relative));
$(this._id_datepicker_hdr).update(' '+ this.getMonthLocale(this._current_mon) +' '+ this._current_year +' ');
}
};
+
+
+function msieversion()
+{
+ var ua = window.navigator.userAgent
+ var msie = ua.indexOf ( "MSIE " )
+ if ( msie > 0 ) // If Internet Explorer, return version number
+ return parseInt (ua.substring (msie+5, ua.indexOf (".", msie )))
+ else // If another browser, return 0
+ return 0
+}
+