Skip to content

Commit

Permalink
feature 2771 upgrade jquery ui - forgot to add non minimified files (…
Browse files Browse the repository at this point in the history
…not used anywhere in the code, but for the sake of coherence)

git-svn-id: http://piwigo.org/svn/trunk@18953 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Nov 6, 2012
1 parent 8ec9fb3 commit f0d061d
Show file tree
Hide file tree
Showing 17 changed files with 3,830 additions and 0 deletions.
82 changes: 82 additions & 0 deletions themes/default/js/ui/jquery.ui.effect-blind.js
@@ -0,0 +1,82 @@
/*!
* jQuery UI Effects Blind 1.9.0
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/blind-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {

var rvertical = /up|down|vertical/,
rpositivemotion = /up|left|vertical|horizontal/;

$.effects.effect.blind = function( o, done ) {
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
mode = $.effects.setMode( el, o.mode || "hide" ),
direction = o.direction || "up",
vertical = rvertical.test( direction ),
ref = vertical ? "height" : "width",
ref2 = vertical ? "top" : "left",
motion = rpositivemotion.test( direction ),
animation = {},
show = mode === "show",
wrapper, distance, margin;

// if already wrapped, the wrapper's properties are my property. #6245
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
$.effects.save( el.parent(), props );
} else {
$.effects.save( el, props );
}
el.show();
wrapper = $.effects.createWrapper( el ).css({
overflow: "hidden"
});

distance = wrapper[ ref ]();
margin = parseFloat( wrapper.css( ref2 ) ) || 0;

animation[ ref ] = show ? distance : 0;
if ( !motion ) {
el
.css( vertical ? "bottom" : "right", 0 )
.css( vertical ? "top" : "left", "auto" )
.css({ position: "absolute" });

animation[ ref2 ] = show ? margin : distance + margin;
}

// start at 0 if we are showing
if ( show ) {
wrapper.css( ref, 0 );
if ( ! motion ) {
wrapper.css( ref2, margin + distance );
}
}

// Animate
wrapper.animate( animation, {
duration: o.duration,
easing: o.easing,
queue: false,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});

};

})(jQuery);
113 changes: 113 additions & 0 deletions themes/default/js/ui/jquery.ui.effect-bounce.js
@@ -0,0 +1,113 @@
/*!
* jQuery UI Effects Bounce 1.9.0
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/bounce-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {

$.effects.effect.bounce = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],

// defaults:
mode = $.effects.setMode( el, o.mode || "effect" ),
hide = mode === "hide",
show = mode === "show",
direction = o.direction || "up",
distance = o.distance,
times = o.times || 5,

// number of internal animations
anims = times * 2 + ( show || hide ? 1 : 0 ),
speed = o.duration / anims,
easing = o.easing,

// utility:
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
motion = ( direction === "up" || direction === "left" ),
i,
upAnim,
downAnim,

// we will need to re-assemble the queue to stack our animations in place
queue = el.queue(),
queuelen = queue.length;

// Avoid touching opacity to prevent clearType and PNG issues in IE
if ( show || hide ) {
props.push( "opacity" );
}

$.effects.save( el, props );
el.show();
$.effects.createWrapper( el ); // Create Wrapper

// default distance for the BIGGEST bounce is the outer Distance / 3
if ( !distance ) {
distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
}

if ( show ) {
downAnim = { opacity: 1 };
downAnim[ ref ] = 0;

// if we are showing, force opacity 0 and set the initial position
// then do the "first" animation
el.css( "opacity", 0 )
.css( ref, motion ? -distance * 2 : distance * 2 )
.animate( downAnim, speed, easing );
}

// start at the smallest distance if we are hiding
if ( hide ) {
distance = distance / Math.pow( 2, times - 1 );
}

downAnim = {};
downAnim[ ref ] = 0;
// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
for ( i = 0; i < times; i++ ) {
upAnim = {};
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;

el.animate( upAnim, speed, easing )
.animate( downAnim, speed, easing );

distance = hide ? distance * 2 : distance / 2;
}

// Last Bounce when Hiding
if ( hide ) {
upAnim = { opacity: 0 };
upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;

el.animate( upAnim, speed, easing );
}

el.queue(function() {
if ( hide ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
});

// inject all the animations we just queued to be first in line (after "inprogress")
if ( queuelen > 1) {
queue.splice.apply( queue,
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
}
el.dequeue();

};

})(jQuery);
67 changes: 67 additions & 0 deletions themes/default/js/ui/jquery.ui.effect-clip.js
@@ -0,0 +1,67 @@
/*!
* jQuery UI Effects Clip 1.9.0
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/clip-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {

$.effects.effect.clip = function( o, done ) {
// Create element
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
mode = $.effects.setMode( el, o.mode || "hide" ),
show = mode === "show",
direction = o.direction || "vertical",
vert = direction === "vertical",
size = vert ? "height" : "width",
position = vert ? "top" : "left",
animation = {},
wrapper, animate, distance;

// Save & Show
$.effects.save( el, props );
el.show();

// Create Wrapper
wrapper = $.effects.createWrapper( el ).css({
overflow: "hidden"
});
animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
distance = animate[ size ]();

// Shift
if ( show ) {
animate.css( size, 0 );
animate.css( position, distance / 2 );
}

// Create Animation Object:
animation[ size ] = show ? distance : 0;
animation[ position ] = show ? 0 : distance / 2;

// Animate
animate.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( !show ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});

};

})(jQuery);
65 changes: 65 additions & 0 deletions themes/default/js/ui/jquery.ui.effect-drop.js
@@ -0,0 +1,65 @@
/*!
* jQuery UI Effects Drop 1.9.0
* http://jqueryui.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/drop-effect/
*
* Depends:
* jquery.ui.effect.js
*/
(function( $, undefined ) {

$.effects.effect.drop = function( o, done ) {

var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
mode = $.effects.setMode( el, o.mode || "hide" ),
show = mode === "show",
direction = o.direction || "left",
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
animation = {
opacity: show ? 1 : 0
},
distance;

// Adjust
$.effects.save( el, props );
el.show();
$.effects.createWrapper( el );

distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;

if ( show ) {
el
.css( "opacity", 0 )
.css( ref, motion === "pos" ? -distance : distance );
}

// Animation
animation[ ref ] = ( show ?
( motion === "pos" ? "+=" : "-=" ) :
( motion === "pos" ? "-=" : "+=" ) ) +
distance;

// Animate
el.animate( animation, {
queue: false,
duration: o.duration,
easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
};

})(jQuery);

0 comments on commit f0d061d

Please sign in to comment.