}
// TODO: can we hook into core's logic?
- if ( $.browser.msie || $.browser.opera ) {
+ if ( $.ui.ie || (({}).toString.call( window.opera ) === "[object Opera]") ) {
// TODO: is charCode ever <0 ? Can we just use charCode || keyCode?
event.keyCode = (options.charCode > 0) ? options.charCode : options.keyCode;
event.charCode = undefined;
var header, title, table, thead, week, panel, inl, child,
inp = init('#inp').focus(),
dp = $('#ui-datepicker-div'),
- iframe = ($.browser.msie && parseInt($.browser.version, 10) < 7);
+ iframe = ($.ui.ie6);
ok(dp.is(':visible'), 'Structure - datepicker visible');
ok(!dp.is('.ui-datepicker-rtl'), 'Structure - not right-to-left');
ok(!dp.is('.ui-datepicker-multi'), 'Structure - not multi-month');
inp = init('#inp', $.datepicker.regional.he);
inp.data('showButtonPanel.datepicker',true);
inp.focus();
- iframe = ($.browser.msie && parseInt($.browser.version, 10) < 7);
+ iframe = ($.ui.ie6);
ok(dp.is('.ui-datepicker-rtl'), 'Structure RTL - right-to-left');
header = dp.children(':first');
ok(header.is('div.ui-datepicker-header'), 'Structure RTL - header division');
scrollParent: function() {
var scrollParent;
- if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
scrollParent = this.parents().filter(function() {
return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
}).eq(0);
// deprecated
+(function() {
+ var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
+ $.ui.ie = uaMatch.length ? true : false;
+ $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
+})();
+
$.fn.extend({
disableSelection: function() {
return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
}
html += group;
}
- html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ html += buttonPanel + ($.ui.ie6 && !inst.inline ?
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
inst._keyEvent = false;
return html;
var scrollHeight,
offsetHeight;
// handle IE
- if ( $.browser.msie ) {
+ if ( $.ui.ie ) {
scrollHeight = Math.max(
document.documentElement.scrollHeight,
document.body.scrollHeight
var scrollWidth,
offsetWidth;
// handle IE
- if ( $.browser.msie ) {
+ if ( $.ui.ie ) {
scrollWidth = Math.max(
document.documentElement.scrollWidth,
document.body.scrollWidth
}
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
po = { top: 0, left: 0 };
return {
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+ if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
return this._mouseUp(event);
}
this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
// fix ie6 offset TODO: This seems broken
- var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
- pxyoffset = ( ie6 ? 2 : -1 );
+ var ie6offset = ($.ui.ie6 ? 1 : 0),
+ pxyoffset = ( $.ui.ie6 ? 2 : -1 );
this.helper.addClass(this._helper).css({
width: this.element.outerWidth() + pxyoffset,
}
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix
+ || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
po = { top: 0, left: 0 };
return {