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.effect-scale.js

    r18953 r20824  
    11/*!
    2  * jQuery UI Effects Scale 1.9.0
     2 * jQuery UI Effects Scale 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
     
    2222                original = {
    2323                        height: elem.height(),
    24                         width: elem.width()
     24                        width: elem.width(),
     25                        outerHeight: elem.outerHeight(),
     26                        outerWidth: elem.outerWidth()
    2527                };
    2628
     
    3638                        {
    3739                                height: original.height * factor,
    38                                 width: original.width * factor
     40                                width: original.width * factor,
     41                                outerHeight: original.outerHeight * factor,
     42                                outerWidth: original.outerWidth * factor
    3943                        }
    4044        });
     
    7579        }
    7680
    77         options.from = o.from || ( mode === "show" ? { height: 0, width: 0 } : original );
     81        options.from = o.from || ( mode === "show" ? {
     82                height: 0,
     83                width: 0,
     84                outerHeight: 0,
     85                outerWidth: 0
     86        } : original );
    7887        options.to = {
    7988                height: original.height * factor.y,
     
    103112
    104113        // Create element
    105         var el = $( this ),
    106                 props = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
     114        var original, baseline, factor,
     115                el = $( this ),
     116                props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
    107117
    108118                // Always restore
     
    120130                scale = o.scale || "both",
    121131                origin = o.origin || [ "middle", "center" ],
    122                 original, baseline, factor,
    123                 position = el.css( "position" );
     132                position = el.css( "position" ),
     133                props = restore ? props0 : props1,
     134                zero = {
     135                        height: 0,
     136                        width: 0,
     137                        outerHeight: 0,
     138                        outerWidth: 0
     139                };
    124140
    125141        if ( mode === "show" ) {
     
    133149        };
    134150
    135         el.from = o.from || original;
    136         el.to = o.to || original;
     151        if ( o.mode === "toggle" && mode === "show" ) {
     152                el.from = o.to || zero;
     153                el.to = o.from || original;
     154        } else {
     155                el.from = o.from || ( mode === "show" ? zero : original );
     156                el.to = o.to || ( mode === "hide" ? zero : original );
     157        }
    137158
    138159        // Set scaling factor
     
    171192                // Vertical props scaling
    172193                if ( factor.from.y !== factor.to.y ) {
    173                         props = props.concat( cProps );
     194                        props = props.concat( cProps ).concat( props2 );
    174195                        el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
    175196                        el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
     
    177198        }
    178199
    179         $.effects.save( el, restore ? props : props1 );
     200        $.effects.save( el, props );
    180201        el.show();
    181202        $.effects.createWrapper( el );
     
    198219                vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
    199220                hProps = hProps.concat([ "marginLeft", "marginRight" ]);
    200                 props2 = props.concat(vProps).concat(hProps);
     221                props2 = props0.concat(vProps).concat(hProps);
    201222
    202223                el.find( "*[width]" ).each( function(){
     
    204225                                c_original = {
    205226                                        height: child.height(),
    206                                         width: child.width()
     227                                        width: child.width(),
     228                                        outerHeight: child.outerHeight(),
     229                                        outerWidth: child.outerWidth()
    207230                                };
    208231                        if (restore) {
     
    212235                        child.from = {
    213236                                height: c_original.height * factor.from.y,
    214                                 width: c_original.width * factor.from.x
     237                                width: c_original.width * factor.from.x,
     238                                outerHeight: c_original.outerHeight * factor.from.y,
     239                                outerWidth: c_original.outerWidth * factor.from.x
    215240                        };
    216241                        child.to = {
    217242                                height: c_original.height * factor.to.y,
    218                                 width: c_original.width * factor.to.x
     243                                width: c_original.width * factor.to.x,
     244                                outerHeight: c_original.height * factor.to.y,
     245                                outerWidth: c_original.width * factor.to.x
    219246                        };
    220247
     
    255282                                el.hide();
    256283                        }
    257                         $.effects.restore( el, restore ? props : props1 );
     284                        $.effects.restore( el, props );
    258285                        if ( !restore ) {
    259286
Note: See TracChangeset for help on using the changeset viewer.