Dotclear


Ignore:
Timestamp:
11/30/12 06:53:40 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Update jQuery from 1.8.2 to 1.8.3, jQuery-UI from 1.9.0 to 1.9.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/jquery/jquery-ui.custom.js

    r906 r1048  
    1 /*! jQuery UI - v1.9.0 - 2012-10-25 
     1/*! jQuery UI - v1.9.2 - 2012-11-29 
    22* http://jqueryui.com 
    33* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.sortable.js, jquery.ui.accordion.js 
     
    1818 
    1919$.extend( $.ui, { 
    20      version: "1.9.0", 
     20     version: "1.9.2", 
    2121 
    2222     keyCode: { 
     
    6565     scrollParent: function() { 
    6666          var scrollParent; 
    67           if (($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { 
     67          if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { 
    6868               scrollParent = this.parents().filter(function() { 
    6969                    return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x')); 
     
    124124}); 
    125125 
     126// selectors 
     127function focusable( element, isTabIndexNotNaN ) { 
     128     var map, mapName, img, 
     129          nodeName = element.nodeName.toLowerCase(); 
     130     if ( "area" === nodeName ) { 
     131          map = element.parentNode; 
     132          mapName = map.name; 
     133          if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 
     134               return false; 
     135          } 
     136          img = $( "img[usemap=#" + mapName + "]" )[0]; 
     137          return !!img && visible( img ); 
     138     } 
     139     return ( /input|select|textarea|button|object/.test( nodeName ) ? 
     140          !element.disabled : 
     141          "a" === nodeName ? 
     142               element.href || isTabIndexNotNaN : 
     143               isTabIndexNotNaN) && 
     144          // the element and all of its ancestors must be visible 
     145          visible( element ); 
     146} 
     147 
     148function visible( element ) { 
     149     return $.expr.filters.visible( element ) && 
     150          !$( element ).parents().andSelf().filter(function() { 
     151               return $.css( this, "visibility" ) === "hidden"; 
     152          }).length; 
     153} 
     154 
     155$.extend( $.expr[ ":" ], { 
     156     data: $.expr.createPseudo ? 
     157          $.expr.createPseudo(function( dataName ) { 
     158               return function( elem ) { 
     159                    return !!$.data( elem, dataName ); 
     160               }; 
     161          }) : 
     162          // support: jQuery <1.8 
     163          function( elem, i, match ) { 
     164               return !!$.data( elem, match[ 3 ] ); 
     165          }, 
     166 
     167     focusable: function( element ) { 
     168          return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 
     169     }, 
     170 
     171     tabbable: function( element ) { 
     172          var tabIndex = $.attr( element, "tabindex" ), 
     173               isTabIndexNaN = isNaN( tabIndex ); 
     174          return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 
     175     } 
     176}); 
     177 
     178// support 
     179$(function() { 
     180     var body = document.body, 
     181          div = body.appendChild( div = document.createElement( "div" ) ); 
     182 
     183     // access offsetHeight before setting the style to prevent a layout bug 
     184     // in IE 9 which causes the element to continue to take up space even 
     185     // after it is removed from the DOM (#8026) 
     186     div.offsetHeight; 
     187 
     188     $.extend( div.style, { 
     189          minHeight: "100px", 
     190          height: "auto", 
     191          padding: 0, 
     192          borderWidth: 0 
     193     }); 
     194 
     195     $.support.minHeight = div.offsetHeight === 100; 
     196     $.support.selectstart = "onselectstart" in div; 
     197 
     198     // set display to none to avoid a layout bug in IE 
     199     // http://dev.jquery.com/ticket/4014 
     200     body.removeChild( div ).style.display = "none"; 
     201}); 
     202 
    126203// support: jQuery <1.8 
    127204if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { 
     
    171248} 
    172249 
    173 // selectors 
    174 function focusable( element, isTabIndexNotNaN ) { 
    175      var map, mapName, img, 
    176           nodeName = element.nodeName.toLowerCase(); 
    177      if ( "area" === nodeName ) { 
    178           map = element.parentNode; 
    179           mapName = map.name; 
    180           if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { 
    181                return false; 
    182           } 
    183           img = $( "img[usemap=#" + mapName + "]" )[0]; 
    184           return !!img && visible( img ); 
    185      } 
    186      return ( /input|select|textarea|button|object/.test( nodeName ) ? 
    187           !element.disabled : 
    188           "a" === nodeName ? 
    189                element.href || isTabIndexNotNaN : 
    190                isTabIndexNotNaN) && 
    191           // the element and all of its ancestors must be visible 
    192           visible( element ); 
     250// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) 
     251if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { 
     252     $.fn.removeData = (function( removeData ) { 
     253          return function( key ) { 
     254               if ( arguments.length ) { 
     255                    return removeData.call( this, $.camelCase( key ) ); 
     256               } else { 
     257                    return removeData.call( this ); 
     258               } 
     259          }; 
     260     })( $.fn.removeData ); 
    193261} 
    194262 
    195 function visible( element ) { 
    196      return !$( element ).parents().andSelf().filter(function() { 
    197           return $.css( this, "visibility" ) === "hidden" || 
    198                $.expr.filters.hidden( this ); 
    199      }).length; 
    200 } 
    201  
    202 $.extend( $.expr[ ":" ], { 
    203      data: $.expr.createPseudo ? 
    204           $.expr.createPseudo(function( dataName ) { 
    205                return function( elem ) { 
    206                     return !!$.data( elem, dataName ); 
    207                }; 
    208           }) : 
    209           // support: jQuery <1.8 
    210           function( elem, i, match ) { 
    211                return !!$.data( elem, match[ 3 ] ); 
    212           }, 
    213  
    214      focusable: function( element ) { 
    215           return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); 
    216      }, 
    217  
    218      tabbable: function( element ) { 
    219           var tabIndex = $.attr( element, "tabindex" ), 
    220                isTabIndexNaN = isNaN( tabIndex ); 
    221           return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); 
    222      } 
    223 }); 
    224  
    225 // support 
    226 $(function() { 
    227      var body = document.body, 
    228           div = body.appendChild( div = document.createElement( "div" ) ); 
    229  
    230      // access offsetHeight before setting the style to prevent a layout bug 
    231      // in IE 9 which causes the element to continue to take up space even 
    232      // after it is removed from the DOM (#8026) 
    233      div.offsetHeight; 
    234  
    235      $.extend( div.style, { 
    236           minHeight: "100px", 
    237           height: "auto", 
    238           padding: 0, 
    239           borderWidth: 0 
    240      }); 
    241  
    242      $.support.minHeight = div.offsetHeight === 100; 
    243      $.support.selectstart = "onselectstart" in div; 
    244  
    245      // set display to none to avoid a layout bug in IE 
    246      // http://dev.jquery.com/ticket/4014 
    247      body.removeChild( div ).style.display = "none"; 
    248 }); 
    249  
    250263 
    251264 
     
    253266 
    254267// deprecated 
     268 
     269(function() { 
     270     var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || []; 
     271     $.ui.ie = uaMatch.length ? true : false; 
     272     $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6; 
     273})(); 
    255274 
    256275$.fn.extend({ 
     
    424443          // always use the name + a colon as the prefix, e.g., draggable:start 
    425444          // don't prefix for widgets that aren't DOM-based 
    426           widgetEventPrefix: name 
     445          widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name 
    427446     }, prototype, { 
    428447          constructor: constructor, 
     
    465484          for ( key in input[ inputIndex ] ) { 
    466485               value = input[ inputIndex ][ key ]; 
    467                if (input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 
    468                     target[ key ] = $.isPlainObject( value ) ? $.widget.extend( {}, target[ key ], value ) : value; 
     486               if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { 
     487                    // Clone objects 
     488                    if ( $.isPlainObject( value ) ) { 
     489                         target[ key ] = $.isPlainObject( target[ key ] ) ? 
     490                              $.widget.extend( {}, target[ key ], value ) : 
     491                              // Don't extend strings, arrays, etc. with objects 
     492                              $.widget.extend( {}, value ); 
     493                    // Copy everything else by reference 
     494                    } else { 
     495                         target[ key ] = value; 
     496                    } 
    469497               } 
    470498          } 
     
    474502 
    475503$.widget.bridge = function( name, object ) { 
    476      var fullName = object.prototype.widgetFullName; 
     504     var fullName = object.prototype.widgetFullName || name; 
    477505     $.fn[ name ] = function( options ) { 
    478506          var isMethodCall = typeof options === "string", 
     
    510538                         instance.option( options || {} )._init(); 
    511539                    } else { 
    512                          new object( options, this ); 
     540                         $.data( this, fullName, new object( options, this ) ); 
    513541                    } 
    514542               }); 
     
    519547}; 
    520548 
    521 $.Widget = function( options, element ) {}; 
     549$.Widget = function( /* options, element */ ) {}; 
    522550$.Widget._childConstructors = []; 
    523551 
     
    551579               $.data( element, this.widgetName, this ); 
    552580               $.data( element, this.widgetFullName, this ); 
    553                this._on({ remove: "destroy" }); 
     581               this._on( true, this.element, { 
     582                    remove: function( event ) { 
     583                         if ( event.target === element ) { 
     584                              this.destroy(); 
     585                         } 
     586                    } 
     587               }); 
    554588               this.document = $( element.style ? 
    555589                    // element within the document 
     
    669703     }, 
    670704 
    671      _on: function( element, handlers ) { 
     705     _on: function( suppressDisabledCheck, element, handlers ) { 
     706          var delegateElement, 
     707               instance = this; 
     708 
     709          // no suppressDisabledCheck flag, shuffle arguments 
     710          if ( typeof suppressDisabledCheck !== "boolean" ) { 
     711               handlers = element; 
     712               element = suppressDisabledCheck; 
     713               suppressDisabledCheck = false; 
     714          } 
     715 
    672716          // no element argument, shuffle and use this.element 
    673717          if ( !handlers ) { 
    674718               handlers = element; 
    675719               element = this.element; 
     720               delegateElement = this.widget(); 
    676721          } else { 
    677722               // accept selectors, DOM elements 
    678                element = $( element ); 
     723               element = delegateElement = $( element ); 
    679724               this.bindings = this.bindings.add( element ); 
    680725          } 
    681726 
    682           var instance = this; 
    683727          $.each( handlers, function( event, handler ) { 
    684728               function handlerProxy() { 
     
    686730                    // - disabled as an array instead of boolean 
    687731                    // - disabled class as method for disabling individual parts 
    688                     if ( instance.options.disabled === true || 
    689                               $( this ).hasClass( "ui-state-disabled" ) ) { 
     732                    if ( !suppressDisabledCheck && 
     733                              ( instance.options.disabled === true || 
     734                                   $( this ).hasClass( "ui-state-disabled" ) ) ) { 
    690735                         return; 
    691736                    } 
     
    704749                    selector = match[2]; 
    705750               if ( selector ) { 
    706                     instance.widget().delegate( selector, eventName, handlerProxy ); 
     751                    delegateElement.delegate( selector, eventName, handlerProxy ); 
    707752               } else { 
    708753                    element.bind( eventName, handlerProxy ); 
     
    831876 
    832877$.widget("ui.mouse", { 
    833      version: "1.9.0", 
     878     version: "1.9.2", 
    834879     options: { 
    835880          cancel: 'input,textarea,button,select,option', 
     
    916961 
    917962          event.preventDefault(); 
    918            
     963 
    919964          mouseHandled = true; 
    920965          return true; 
     
    923968     _mouseMove: function(event) { 
    924969          // IE mouseup check - mouseup happened when mouse was out of window 
    925           if ($.browser.msie && !(document.documentMode >= 9) && !event.button) { 
     970          if ($.ui.ie && !(document.documentMode >= 9) && !event.button) { 
    926971               return this._mouseUp(event); 
    927972          } 
     
    9821027 
    9831028$.widget("ui.sortable", $.ui.mouse, { 
    984      version: "1.9.0", 
     1029     version: "1.9.2", 
    9851030     widgetEventPrefix: "sort", 
    9861031     ready: false, 
     
    15281573          var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); 
    15291574 
    1530           for (var i=0; i < this.items.length; i++) { 
    1531  
     1575          this.items = $.grep(this.items, function (item) { 
    15321576               for (var j=0; j < list.length; j++) { 
    1533                     if(list[j] == this.items[i].item[0]) 
    1534                          this.items.splice(i,1); 
     1577                    if(list[j] == item.item[0]) 
     1578                         return false; 
    15351579               }; 
    1536  
    1537           }; 
     1580               return true; 
     1581          }); 
    15381582 
    15391583     }, 
     
    17011745               this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); 
    17021746               this.containers[innermostIndex].containerCache.over = 1; 
    1703           } else if(this.currentContainer != this.containers[innermostIndex]) { 
     1747          } else { 
    17041748 
    17051749               //When entering a new container, we will find the item with the least distance and append our item near it 
    1706                var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[innermostIndex].floating ? 'left' : 'top']; 
     1750               var dist = 10000; var itemWithLeastDistance = null; 
     1751               var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top'; 
     1752               var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height'; 
     1753               var base = this.positionAbs[posProperty] + this.offset.click[posProperty]; 
    17071754               for (var j = this.items.length - 1; j >= 0; j--) { 
    17081755                    if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue; 
    1709                     var cur = this.containers[innermostIndex].floating ? this.items[j].item.offset().left : this.items[j].item.offset().top; 
     1756                    if(this.items[j].item[0] == this.currentItem[0]) continue; 
     1757                    var cur = this.items[j].item.offset()[posProperty]; 
     1758                    var nearBottom = false; 
     1759                    if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){ 
     1760                         nearBottom = true; 
     1761                         cur += this.items[j][sizeProperty]; 
     1762                    } 
     1763 
    17101764                    if(Math.abs(cur - base) < dist) { 
    17111765                         dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; 
    1712                          this.direction = (cur - base > 0) ? 'down' : 'up'; 
     1766                         this.direction = nearBottom ? "up": "down"; 
    17131767                    } 
    17141768               } 
     
    17881842 
    17891843          if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information 
    1790           || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix 
     1844          || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix 
    17911845               po = { top: 0, left: 0 }; 
    17921846 
     
    20632117 
    20642118$.widget( "ui.accordion", { 
    2065      version: "1.9.0", 
     2119     version: "1.9.2", 
    20662120     options: { 
    20672121          active: 0, 
     
    20982152               .hide(); 
    20992153 
    2100           // don't allow collapsible: false and active: false 
    2101           if ( !options.collapsible && options.active === false ) { 
     2154          // don't allow collapsible: false and active: false / null 
     2155          if ( !options.collapsible && (options.active === false || options.active == null) ) { 
    21022156               options.active = 0; 
    21032157          } 
     
    21142168 
    21152169          this._createIcons(); 
    2116           this.originalHeight = this.element[0].style.height; 
    21172170          this.refresh(); 
    21182171 
     
    22372290               }); 
    22382291          if ( this.options.heightStyle !== "content" ) { 
    2239                this.element.css( "height", this.originalHeight ); 
    22402292               contents.css( "height", "" ); 
    22412293          } 
     
    23282380               parent = this.element.parent(); 
    23292381 
    2330           this.element.css( "height", this.originalHeight ); 
    23312382 
    23322383          if ( heightStyle === "fill" ) { 
     
    23672418               this.headers.next() 
    23682419                    .each(function() { 
    2369                          maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); 
     2420                         maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); 
    23702421                    }) 
    23712422                    .height( maxHeight ); 
    2372           } 
    2373  
    2374           if ( heightStyle !== "content" ) { 
    2375                this.element.height( this.element.height() ); 
    23762423          } 
    23772424     }, 
     
    26422689               }, 
    26432690 
    2644                _setOption: function( key, value ) { 
     2691               _setOption: function( key ) { 
    26452692                    if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) { 
    26462693                         this.options.heightStyle = this._mergeHeightStyle(); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map