Changeset 20824 for trunk/themes/default/js/ui/jquery.ui.core.js
- Timestamp:
- Feb 18, 2013, 10:18:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/ui/jquery.ui.core.js
r18630 r20824 1 1 /*! 2 * jQuery UI Core 1. 9.02 * jQuery UI Core 1.10.1 3 3 * http://jqueryui.com 4 4 * 5 * Copyright 201 2jQuery Foundation and other contributors5 * Copyright 2013 jQuery Foundation and other contributors 6 6 * Released under the MIT license. 7 7 * http://jquery.org/license … … 23 23 24 24 $.extend( $.ui, { 25 version: "1. 9.0",25 version: "1.10.1", 26 26 27 27 keyCode: { … … 70 70 scrollParent: function() { 71 71 var scrollParent; 72 if (($. browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {72 if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { 73 73 scrollParent = this.parents().filter(function() { 74 return (/(relative|absolute|fixed)/).test($.css(this, 'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));74 return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 75 75 }).eq(0); 76 76 } else { 77 77 scrollParent = this.parents().filter(function() { 78 return (/(auto|scroll)/).test($.css(this, 'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));78 return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x")); 79 79 }).eq(0); 80 80 } 81 81 82 return (/fixed/).test(this.css( 'position')) || !scrollParent.length ? $(document) : scrollParent;82 return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent; 83 83 }, 84 84 … … 129 129 }); 130 130 131 // selectors 132 function focusable( element, isTabIndexNotNaN ) { 133 var map, mapName, img, 134 nodeName = element.nodeName.toLowerCase(); 135 if ( "area" === nodeName ) { 136 map = element.parentNode; 137 mapName = map.name; 138 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 139 return false; 140 } 141 img = $( "img[usemap=#" + mapName + "]" )[0]; 142 return !!img && visible( img ); 143 } 144 return ( /input|select|textarea|button|object/.test( nodeName ) ? 145 !element.disabled : 146 "a" === nodeName ? 147 element.href || isTabIndexNotNaN : 148 isTabIndexNotNaN) && 149 // the element and all of its ancestors must be visible 150 visible( element ); 151 } 152 153 function visible( element ) { 154 return $.expr.filters.visible( element ) && 155 !$( element ).parents().addBack().filter(function() { 156 return $.css( this, "visibility" ) === "hidden"; 157 }).length; 158 } 159 160 $.extend( $.expr[ ":" ], { 161 data: $.expr.createPseudo ? 162 $.expr.createPseudo(function( dataName ) { 163 return function( elem ) { 164 return !!$.data( elem, dataName ); 165 }; 166 }) : 167 // support: jQuery <1.8 168 function( elem, i, match ) { 169 return !!$.data( elem, match[ 3 ] ); 170 }, 171 172 focusable: function( element ) { 173 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 174 }, 175 176 tabbable: function( element ) { 177 var tabIndex = $.attr( element, "tabindex" ), 178 isTabIndexNaN = isNaN( tabIndex ); 179 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 180 } 181 }); 182 131 183 // support: jQuery <1.8 132 184 if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { … … 176 228 } 177 229 178 // selectors 179 function focusable( element, isTabIndexNotNaN ) { 180 var map, mapName, img, 181 nodeName = element.nodeName.toLowerCase(); 182 if ( "area" === nodeName ) { 183 map = element.parentNode; 184 mapName = map.name; 185 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 186 return false; 187 } 188 img = $( "img[usemap=#" + mapName + "]" )[0]; 189 return !!img && visible( img ); 190 } 191 return ( /input|select|textarea|button|object/.test( nodeName ) ? 192 !element.disabled : 193 "a" === nodeName ? 194 element.href || isTabIndexNotNaN : 195 isTabIndexNotNaN) && 196 // the element and all of its ancestors must be visible 197 visible( element ); 198 } 199 200 function visible( element ) { 201 return !$( element ).parents().andSelf().filter(function() { 202 return $.css( this, "visibility" ) === "hidden" || 203 $.expr.filters.hidden( this ); 204 }).length; 205 } 206 207 $.extend( $.expr[ ":" ], { 208 data: $.expr.createPseudo ? 209 $.expr.createPseudo(function( dataName ) { 210 return function( elem ) { 211 return !!$.data( elem, dataName ); 212 }; 213 }) : 214 // support: jQuery <1.8 215 function( elem, i, match ) { 216 return !!$.data( elem, match[ 3 ] ); 217 }, 218 219 focusable: function( element ) { 220 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 221 }, 222 223 tabbable: function( element ) { 224 var tabIndex = $.attr( element, "tabindex" ), 225 isTabIndexNaN = isNaN( tabIndex ); 226 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 227 } 228 }); 229 230 // support 231 $(function() { 232 var body = document.body, 233 div = body.appendChild( div = document.createElement( "div" ) ); 234 235 // access offsetHeight before setting the style to prevent a layout bug 236 // in IE 9 which causes the element to continue to take up space even 237 // after it is removed from the DOM (#8026) 238 div.offsetHeight; 239 240 $.extend( div.style, { 241 minHeight: "100px", 242 height: "auto", 243 padding: 0, 244 borderWidth: 0 245 }); 246 247 $.support.minHeight = div.offsetHeight === 100; 248 $.support.selectstart = "onselectstart" in div; 249 250 // set display to none to avoid a layout bug in IE 251 // http://dev.jquery.com/ticket/4014 252 body.removeChild( div ).style.display = "none"; 253 }); 230 // support: jQuery <1.8 231 if ( !$.fn.addBack ) { 232 $.fn.addBack = function( selector ) { 233 return this.add( selector == null ? 234 this.prevObject : this.prevObject.filter( selector ) 235 ); 236 }; 237 } 238 239 // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) 240 if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 241 $.fn.removeData = (function( removeData ) { 242 return function( key ) { 243 if ( arguments.length ) { 244 return removeData.call( this, $.camelCase( key ) ); 245 } else { 246 return removeData.call( this ); 247 } 248 }; 249 })( $.fn.removeData ); 250 } 254 251 255 252 … … 258 255 259 256 // deprecated 260 257 $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); 258 259 $.support.selectstart = "onselectstart" in document.createElement( "div" ); 261 260 $.fn.extend({ 262 261 disableSelection: function() { … … 298 297 }, 299 298 300 contains: $.contains,301 302 299 // only used by resizable 303 300 hasScroll: function( el, a ) { … … 322 319 el[ scroll ] = 0; 323 320 return has; 324 },325 326 // these are odd functions, fix the API or move into individual plugins327 isOverAxis: function( x, reference, size ) {328 //Determines when x coordinate is over "b" element axis329 return ( x > reference ) && ( x < ( reference + size ) );330 },331 isOver: function( y, x, top, left, height, width ) {332 //Determines when x, y coordinates is over "b" element333 return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );334 321 } 335 322 });
Note: See TracChangeset
for help on using the changeset viewer.