aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/minified/effects.scale.min.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-02-11 15:57:04 +0000
committerpatdenice <patdenice@piwigo.org>2011-02-11 15:57:04 +0000
commitd37ec3ddfd467f4b268086828440757133d0457e (patch)
tree39bea580f47578580151d334a2f9e3e23937a3ad /themes/default/js/ui/minified/effects.scale.min.js
parent1d6681d9b00024290ed565f60ba52e9a234474fc (diff)
Update jQuery to 1.5 and jQuery UI to 1.8.9
git-svn-id: http://piwigo.org/svn/trunk@9172 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui/minified/effects.scale.min.js')
-rw-r--r--themes/default/js/ui/minified/effects.scale.min.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/themes/default/js/ui/minified/effects.scale.min.js b/themes/default/js/ui/minified/effects.scale.min.js
deleted file mode 100644
index 5b6a336eb..000000000
--- a/themes/default/js/ui/minified/effects.scale.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"hide");var percent=parseInt(o.options.percent,10)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=="hide")?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=="hide")?percent:100;options.mode=mode;el.effect("scale",options,o.duration,o.callback);el.dequeue()})};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"effect");var percent=parseInt(o.options.percent,10)||(parseInt(o.options.percent,10)==0?0:(mode=="hide"?0:100));var direction=o.options.direction||"both";var origin=o.options.origin;if(mode!="effect"){options.origin=origin||["middle","center"];options.restore=true}var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=="show"?{height:0,width:0}:original);var factor={y:direction!="horizontal"?(percent/100):1,x:direction!="vertical"?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=="show"){el.from.opacity=0;el.to.opacity=1}if(mode=="hide"){el.from.opacity=1;el.to.opacity=0}}options.from=el.from;options.to=el.to;options.mode=mode;el.effect("size",options,o.duration,o.callback);el.dequeue()})};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","width","height","overflow","opacity"];var props1=["position","top","left","overflow","opacity"];var props2=["width","height","overflow"];var cProps=["fontSize"];var vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var mode=$.effects.setMode(el,o.options.mode||"effect");var restore=o.options.restore||false;var scale=o.options.scale||"both";var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x}var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=="box"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale=="content"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}}$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(scale=="content"||scale=="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore){$.effects.save(child,props2)}var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore){$.effects.restore(child,props2)}})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file