diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-10-10 11:45:48 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-10-10 11:45:48 -0400 |
commit | a3f1a34d3b997550a5a8cf4c630e6580cd37cde5 (patch) | |
tree | cd8ff7023ca59a52fa65d3b50e67da76147ee105 /ui | |
parent | fa62f21e5ad09e5368efc3079859730e23a7123b (diff) | |
download | jquery-ui-a3f1a34d3b997550a5a8cf4c630e6580cd37cde5.tar.gz jquery-ui-a3f1a34d3b997550a5a8cf4c630e6580cd37cde5.zip |
Remove use of $.browser; add $.ui.ie and $.ui.ie6 temporarily.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.core.js | 8 | ||||
-rw-r--r-- | ui/jquery.ui.datepicker.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.dialog.js | 4 | ||||
-rw-r--r-- | ui/jquery.ui.draggable.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.mouse.js | 2 | ||||
-rw-r--r-- | ui/jquery.ui.resizable.js | 4 | ||||
-rw-r--r-- | ui/jquery.ui.sortable.js | 2 |
7 files changed, 15 insertions, 9 deletions
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index bb9411dc9..e569eea42 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -69,7 +69,7 @@ $.fn.extend({ 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); @@ -258,6 +258,12 @@ $(function() { // 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" ) + diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 9ea36924b..4643af2eb 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1605,7 +1605,7 @@ $.extend(Datepicker.prototype, { } 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; diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 98bd7fcaa..8593fff85 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -768,7 +768,7 @@ $.extend( $.ui.dialog.overlay, { var scrollHeight, offsetHeight; // handle IE - if ( $.browser.msie ) { + if ( $.ui.ie ) { scrollHeight = Math.max( document.documentElement.scrollHeight, document.body.scrollHeight @@ -793,7 +793,7 @@ $.extend( $.ui.dialog.overlay, { var scrollWidth, offsetWidth; // handle IE - if ( $.browser.msie ) { + if ( $.ui.ie ) { scrollWidth = Math.max( document.documentElement.scrollWidth, document.body.scrollWidth diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 2e33e3311..e110bd8a4 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -318,7 +318,7 @@ $.widget("ui.draggable", $.ui.mouse, { } 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 { diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 30546ffc4..f5069d00c 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -111,7 +111,7 @@ $.widget("ui.mouse", { _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); } diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js index 724ae9ddf..cc82b8b92 100644 --- a/ui/jquery.ui.resizable.js +++ b/ui/jquery.ui.resizable.js @@ -466,8 +466,8 @@ $.widget("ui.resizable", $.ui.mouse, { 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, diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 070dff6cd..920e645d4 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -822,7 +822,7 @@ $.widget("ui.sortable", $.ui.mouse, { } 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 { |