Ignore:
Timestamp:
Feb 18, 2013, 10:18:40 PM (11 years ago)
Author:
rvelices
Message:

upgraded jquery ui from 1.9.0 to 1.10.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/ui/jquery.ui.core.js

    r18630 r20824  
    11/*!
    2  * jQuery UI Core 1.9.0
     2 * jQuery UI Core 1.10.1
    33 * http://jqueryui.com
    44 *
    5  * Copyright 2012 jQuery Foundation and other contributors
     5 * Copyright 2013 jQuery Foundation and other contributors
    66 * Released under the MIT license.
    77 * http://jquery.org/license
     
    2323
    2424$.extend( $.ui, {
    25         version: "1.9.0",
     25        version: "1.10.1",
    2626
    2727        keyCode: {
     
    7070        scrollParent: function() {
    7171                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"))) {
    7373                        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"));
    7575                        }).eq(0);
    7676                } else {
    7777                        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"));
    7979                        }).eq(0);
    8080                }
    8181
    82                 return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
     82                return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
    8383        },
    8484
     
    129129});
    130130
     131// selectors
     132function 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
     153function 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
    131183// support: jQuery <1.8
    132184if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
     
    176228}
    177229
    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
     231if ( !$.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)
     240if ( $( "<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}
    254251
    255252
     
    258255
    259256// deprecated
    260 
     257$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
     258
     259$.support.selectstart = "onselectstart" in document.createElement( "div" );
    261260$.fn.extend({
    262261        disableSelection: function() {
     
    298297        },
    299298
    300         contains: $.contains,
    301 
    302299        // only used by resizable
    303300        hasScroll: function( el, a ) {
     
    322319                el[ scroll ] = 0;
    323320                return has;
    324         },
    325 
    326         // these are odd functions, fix the API or move into individual plugins
    327         isOverAxis: function( x, reference, size ) {
    328                 //Determines when x coordinate is over "b" element axis
    329                 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" element
    333                 return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
    334321        }
    335322});
Note: See TracChangeset for help on using the changeset viewer.