Ignore:
Timestamp:
Oct 28, 2011, 3:25:54 PM (12 years ago)
Author:
patdenice
Message:

feature:2487
Update jQuery to 1.6.4 and jQuery UI to 1.8.16

File:
1 edited

Legend:

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

    r9559 r12525  
    11/*
    2  * jQuery UI Effects 1.8.10
     2 * jQuery UI Effects 1.8.16
    33 *
    44 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
     
    232232        }
    233233
    234         return this.queue('fx', function() {
     234        return this.queue(function() {
    235235                var that = $(this),
    236236                        originalStyleAttr = that.attr('style') || ' ',
    237237                        originalStyle = filterStyles(getElementStyles.call(this)),
    238238                        newStyle,
    239                         className = that.attr('className');
     239                        className = that.attr('class');
    240240
    241241                $.each(classAnimationActions, function(i, action) {
     
    245245                });
    246246                newStyle = filterStyles(getElementStyles.call(this));
    247                 that.attr('className', className);
    248 
    249                 that.animate(styleDifference(originalStyle, newStyle), duration, easing, function() {
    250                         $.each(classAnimationActions, function(i, action) {
    251                                 if (value[action]) { that[action + 'Class'](value[action]); }
    252                         });
    253                         // work around bug in IE by clearing the cssText before setting it
    254                         if (typeof that.attr('style') == 'object') {
    255                                 that.attr('style').cssText = '';
    256                                 that.attr('style').cssText = originalStyleAttr;
    257                         } else {
    258                                 that.attr('style', originalStyleAttr);
     247                that.attr('class', className);
     248
     249                that.animate(styleDifference(originalStyle, newStyle), {
     250                        queue: false,
     251                        duration: duration,
     252                        easing: easing,
     253                        complete: function() {
     254                                $.each(classAnimationActions, function(i, action) {
     255                                        if (value[action]) { that[action + 'Class'](value[action]); }
     256                                });
     257                                // work around bug in IE by clearing the cssText before setting it
     258                                if (typeof that.attr('style') == 'object') {
     259                                        that.attr('style').cssText = '';
     260                                        that.attr('style').cssText = originalStyleAttr;
     261                                } else {
     262                                        that.attr('style', originalStyleAttr);
     263                                }
     264                                if (callback) { callback.apply(this, arguments); }
     265                                $.dequeue( this );
    259266                        }
    260                         if (callback) { callback.apply(this, arguments); }
    261267                });
    262 
    263                 // $.animate adds a function to the end of the queue
    264                 // but we want it at the front
    265                 var queue = $.queue(this),
    266                         anim = queue.splice(queue.length - 1, 1)[0];
    267                 queue.splice(1, 0, anim);
    268                 $.dequeue(this);
    269268        });
    270269};
     
    308307
    309308$.extend($.effects, {
    310         version: "1.8.10",
     309        version: "1.8.16",
    311310
    312311        // Saves a set of properties in a data storage
     
    369368                                        margin: 0,
    370369                                        padding: 0
    371                                 });
     370                                }),
     371                        active = document.activeElement;
    372372
    373373                element.wrap(wrapper);
     374
     375                // Fixes #7595 - Elements lose focus when wrapped.
     376                if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
     377                        $( active ).focus();
     378                }
     379               
    374380                wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
    375381
     
    396402
    397403        removeWrapper: function(element) {
    398                 if (element.parent().is('.ui-effects-wrapper'))
    399                         return element.parent().replaceWith(element);
     404                var parent,
     405                        active = document.activeElement;
     406               
     407                if (element.parent().is('.ui-effects-wrapper')) {
     408                        parent = element.parent().replaceWith(element);
     409                        // Fixes #7595 - Elements lose focus when wrapped.
     410                        if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
     411                                $( active ).focus();
     412                        }
     413                        return parent;
     414                }
     415                       
    400416                return element;
    401417        },
Note: See TracChangeset for help on using the changeset viewer.