first commit
This commit is contained in:
337
libraries/framework/vendor/plugins/flip/jquery.flip.js
vendored
Normal file
337
libraries/framework/vendor/plugins/flip/jquery.flip.js
vendored
Normal file
@@ -0,0 +1,337 @@
|
||||
/*
|
||||
* Flip! jQuery Plugin (http://lab.smashup.it/flip/)
|
||||
* @author Luca Manno (luca@smashup.it) [http://i.smashup.it]
|
||||
* [Original idea by Nicola Rizzo (thanks!)]
|
||||
*
|
||||
* @version 0.9.9 [Nov. 2009]
|
||||
*
|
||||
* @changelog
|
||||
* v 0.9.9 -> Fix transparency over non-colored background. Added dontChangeColor option.
|
||||
* Added $clone and $this parameters to on.. callback functions.
|
||||
* Force hexadecimal color values. Made safe for noConflict use.
|
||||
* Some refactoring. [Henrik Hjelte, Jul. 10, 2009]
|
||||
* Added revert options, fixes and improvements on color management.
|
||||
* Released in Nov 2009
|
||||
* v 0.5 -> Added patch to make it work with Opera (thanks to Peter Siewert), Added callbacks [Feb. 1, 2008]
|
||||
* v 0.4.1 -> Fixed a regression in Chrome and Safari caused by getTransparent [Oct. 1, 2008]
|
||||
* v 0.4 -> Fixed some bugs with transparent color. Now Flip! works on non-white backgrounds | Update: jquery.color.js plugin or jqueryUI still needed :( [Sept. 29, 2008]
|
||||
* v 0.3 -> Now is possibile to define the content after the animation.
|
||||
* (jQuery object or text/html is allowed) [Sept. 25, 2008]
|
||||
* v 0.2 -> Fixed chainability and buggy innertext rendering (xNephilimx thanks!)
|
||||
* v 0.1 -> Starting release [Sept. 11, 2008]
|
||||
*
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
function int_prop(fx){
|
||||
fx.elem.style[ fx.prop ] = parseInt(fx.now,10) + fx.unit;
|
||||
}
|
||||
|
||||
var throwError=function(message) {
|
||||
throw({name:"jquery.flip.js plugin error",message:message});
|
||||
};
|
||||
|
||||
var isIE6orOlder=function() {
|
||||
// User agent sniffing is clearly out of fashion and $.browser will be be deprectad.
|
||||
// Now, I can't think of a way to feature detect that IE6 doesn't show transparent
|
||||
// borders in the correct way.
|
||||
// Until then, this function will do, and be partly political correct, allowing
|
||||
// 0.01 percent of the internet users to tweak with their UserAgent string.
|
||||
//
|
||||
// Not leadingWhiteSpace is to separate IE family from, well who knows?
|
||||
// Maybe some version of Opera?
|
||||
// The second guess behind this is that IE7+ will keep supporting maxHeight in the future.
|
||||
|
||||
// First guess changed to dean edwards ie sniffing http://dean.edwards.name/weblog/2007/03/sniff/
|
||||
return (/*@cc_on!@*/false && (typeof document.body.style.maxHeight === "undefined"));
|
||||
};
|
||||
|
||||
|
||||
// Some named colors to work with
|
||||
// From Interface by Stefan Petre
|
||||
// http://interface.eyecon.ro/
|
||||
|
||||
var colors = {
|
||||
aqua:[0,255,255],
|
||||
azure:[240,255,255],
|
||||
beige:[245,245,220],
|
||||
black:[0,0,0],
|
||||
blue:[0,0,255],
|
||||
brown:[165,42,42],
|
||||
cyan:[0,255,255],
|
||||
darkblue:[0,0,139],
|
||||
darkcyan:[0,139,139],
|
||||
darkgrey:[169,169,169],
|
||||
darkgreen:[0,100,0],
|
||||
darkkhaki:[189,183,107],
|
||||
darkmagenta:[139,0,139],
|
||||
darkolivegreen:[85,107,47],
|
||||
darkorange:[255,140,0],
|
||||
darkorchid:[153,50,204],
|
||||
darkred:[139,0,0],
|
||||
darksalmon:[233,150,122],
|
||||
darkviolet:[148,0,211],
|
||||
fuchsia:[255,0,255],
|
||||
gold:[255,215,0],
|
||||
green:[0,128,0],
|
||||
indigo:[75,0,130],
|
||||
khaki:[240,230,140],
|
||||
lightblue:[173,216,230],
|
||||
lightcyan:[224,255,255],
|
||||
lightgreen:[144,238,144],
|
||||
lightgrey:[211,211,211],
|
||||
lightpink:[255,182,193],
|
||||
lightyellow:[255,255,224],
|
||||
lime:[0,255,0],
|
||||
magenta:[255,0,255],
|
||||
maroon:[128,0,0],
|
||||
navy:[0,0,128],
|
||||
olive:[128,128,0],
|
||||
orange:[255,165,0],
|
||||
pink:[255,192,203],
|
||||
purple:[128,0,128],
|
||||
violet:[128,0,128],
|
||||
red:[255,0,0],
|
||||
silver:[192,192,192],
|
||||
white:[255,255,255],
|
||||
yellow:[255,255,0],
|
||||
transparent: [255,255,255]
|
||||
};
|
||||
|
||||
var acceptHexColor=function(color) {
|
||||
if(color && color.indexOf("#")==-1 && color.indexOf("(")==-1){
|
||||
return "rgb("+colors[color].toString()+")";
|
||||
} else {
|
||||
return color;
|
||||
}
|
||||
};
|
||||
|
||||
$.extend( $.fx.step, {
|
||||
borderTopWidth : int_prop,
|
||||
borderBottomWidth : int_prop,
|
||||
borderLeftWidth: int_prop,
|
||||
borderRightWidth: int_prop
|
||||
});
|
||||
|
||||
$.fn.revertFlip = function(){
|
||||
return this.each( function(){
|
||||
var $this = $(this);
|
||||
$this.flip($this.data('flipRevertedSettings'));
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.flip = function(settings){
|
||||
return this.each( function() {
|
||||
var $this=$(this), flipObj, $clone, dirOption, dirOptions, newContent, ie6=isIE6orOlder();
|
||||
|
||||
if($this.data('flipLock')){
|
||||
return false;
|
||||
}
|
||||
|
||||
var revertedSettings = {
|
||||
direction: (function(direction){
|
||||
switch(direction)
|
||||
{
|
||||
case "tb":
|
||||
return "bt";
|
||||
case "bt":
|
||||
return "tb";
|
||||
case "lr":
|
||||
return "rl";
|
||||
case "rl":
|
||||
return "lr";
|
||||
default:
|
||||
return "bt";
|
||||
}
|
||||
})(settings.direction),
|
||||
bgColor: acceptHexColor(settings.color) || "#999",
|
||||
color: acceptHexColor(settings.bgColor) || $this.css("background-color"),
|
||||
content: $this.html(),
|
||||
speed: settings.speed || 500,
|
||||
onBefore: settings.onBefore || function(){},
|
||||
onEnd: settings.onEnd || function(){},
|
||||
onAnimation: settings.onAnimation || function(){}
|
||||
};
|
||||
|
||||
$this
|
||||
.data('flipRevertedSettings',revertedSettings)
|
||||
.data('flipLock',1)
|
||||
.data('flipSettings',revertedSettings);
|
||||
|
||||
flipObj = {
|
||||
width: $this.width(),
|
||||
height: $this.height(),
|
||||
bgColor: acceptHexColor(settings.bgColor) || $this.css("background-color"),
|
||||
fontSize: $this.css("font-size") || "12px",
|
||||
direction: settings.direction || "tb",
|
||||
toColor: acceptHexColor(settings.color) || "#999",
|
||||
speed: settings.speed || 500,
|
||||
top: $this.offset().top,
|
||||
left: $this.offset().left,
|
||||
target: settings.content || null,
|
||||
transparent: "transparent",
|
||||
dontChangeColor: settings.dontChangeColor || false,
|
||||
onBefore: settings.onBefore || function(){},
|
||||
onEnd: settings.onEnd || function(){},
|
||||
onAnimation: settings.onAnimation || function(){}
|
||||
};
|
||||
|
||||
// This is the first part of a trick to support
|
||||
// transparent borders using chroma filter for IE6
|
||||
// The color below is arbitrary, lets just hope it is not used in the animation
|
||||
ie6 && (flipObj.transparent="#123456");
|
||||
|
||||
$clone= $this.css("visibility","hidden")
|
||||
.clone(true)
|
||||
.data('flipLock',1)
|
||||
.appendTo("body")
|
||||
.html("")
|
||||
.css({visibility:"visible",position:"absolute",left:flipObj.left,top:flipObj.top,margin:0,zIndex:9999,"-webkit-box-shadow":"0px 0px 0px #000","-moz-box-shadow":"0px 0px 0px #000"});
|
||||
|
||||
var defaultStart=function() {
|
||||
return {
|
||||
backgroundColor: flipObj.transparent,
|
||||
fontSize:0,
|
||||
lineHeight:0,
|
||||
borderTopWidth:0,
|
||||
borderLeftWidth:0,
|
||||
borderRightWidth:0,
|
||||
borderBottomWidth:0,
|
||||
borderTopColor:flipObj.transparent,
|
||||
borderBottomColor:flipObj.transparent,
|
||||
borderLeftColor:flipObj.transparent,
|
||||
borderRightColor:flipObj.transparent,
|
||||
background: "none",
|
||||
borderStyle:'solid',
|
||||
height:0,
|
||||
width:0
|
||||
};
|
||||
};
|
||||
var defaultHorizontal=function() {
|
||||
var waist=(flipObj.height/100)*25;
|
||||
var start=defaultStart();
|
||||
start.width=flipObj.width;
|
||||
return {
|
||||
"start": start,
|
||||
"first": {
|
||||
borderTopWidth: 0,
|
||||
borderLeftWidth: waist,
|
||||
borderRightWidth: waist,
|
||||
borderBottomWidth: 0,
|
||||
borderTopColor: '#999',
|
||||
borderBottomColor: '#999',
|
||||
top: (flipObj.top+(flipObj.height/2)),
|
||||
left: (flipObj.left-waist)},
|
||||
"second": {
|
||||
borderBottomWidth: 0,
|
||||
borderTopWidth: 0,
|
||||
borderLeftWidth: 0,
|
||||
borderRightWidth: 0,
|
||||
borderTopColor: flipObj.transparent,
|
||||
borderBottomColor: flipObj.transparent,
|
||||
top: flipObj.top,
|
||||
left: flipObj.left}
|
||||
};
|
||||
};
|
||||
var defaultVertical=function() {
|
||||
var waist=(flipObj.height/100)*25;
|
||||
var start=defaultStart();
|
||||
start.height=flipObj.height;
|
||||
return {
|
||||
"start": start,
|
||||
"first": {
|
||||
borderTopWidth: waist,
|
||||
borderLeftWidth: 0,
|
||||
borderRightWidth: 0,
|
||||
borderBottomWidth: waist,
|
||||
borderLeftColor: '#999',
|
||||
borderRightColor: '#999',
|
||||
top: flipObj.top-waist,
|
||||
left: flipObj.left+(flipObj.width/2)},
|
||||
"second": {
|
||||
borderTopWidth: 0,
|
||||
borderLeftWidth: 0,
|
||||
borderRightWidth: 0,
|
||||
borderBottomWidth: 0,
|
||||
borderLeftColor: flipObj.transparent,
|
||||
borderRightColor: flipObj.transparent,
|
||||
top: flipObj.top,
|
||||
left: flipObj.left}
|
||||
};
|
||||
};
|
||||
|
||||
dirOptions = {
|
||||
"tb": function () {
|
||||
var d=defaultHorizontal();
|
||||
d.start.borderTopWidth=flipObj.height;
|
||||
d.start.borderTopColor=flipObj.bgColor;
|
||||
d.second.borderBottomWidth= flipObj.height;
|
||||
d.second.borderBottomColor= flipObj.toColor;
|
||||
return d;
|
||||
},
|
||||
"bt": function () {
|
||||
var d=defaultHorizontal();
|
||||
d.start.borderBottomWidth=flipObj.height;
|
||||
d.start.borderBottomColor= flipObj.bgColor;
|
||||
d.second.borderTopWidth= flipObj.height;
|
||||
d.second.borderTopColor= flipObj.toColor;
|
||||
return d;
|
||||
},
|
||||
"lr": function () {
|
||||
var d=defaultVertical();
|
||||
d.start.borderLeftWidth=flipObj.width;
|
||||
d.start.borderLeftColor=flipObj.bgColor;
|
||||
d.second.borderRightWidth= flipObj.width;
|
||||
d.second.borderRightColor= flipObj.toColor;
|
||||
return d;
|
||||
},
|
||||
"rl": function () {
|
||||
var d=defaultVertical();
|
||||
d.start.borderRightWidth=flipObj.width;
|
||||
d.start.borderRightColor=flipObj.bgColor;
|
||||
d.second.borderLeftWidth= flipObj.width;
|
||||
d.second.borderLeftColor= flipObj.toColor;
|
||||
return d;
|
||||
}
|
||||
};
|
||||
|
||||
dirOption=dirOptions[flipObj.direction]();
|
||||
|
||||
// Second part of IE6 transparency trick.
|
||||
ie6 && (dirOption.start.filter="chroma(color="+flipObj.transparent+")");
|
||||
|
||||
newContent = function(){
|
||||
var target = flipObj.target;
|
||||
return target && target.jquery ? target.html() : target;
|
||||
};
|
||||
|
||||
$clone.queue(function(){
|
||||
flipObj.onBefore($clone,$this);
|
||||
$clone.html('').css(dirOption.start);
|
||||
$clone.dequeue();
|
||||
});
|
||||
|
||||
$clone.animate(dirOption.first,flipObj.speed);
|
||||
|
||||
$clone.queue(function(){
|
||||
flipObj.onAnimation($clone,$this);
|
||||
$clone.dequeue();
|
||||
});
|
||||
$clone.animate(dirOption.second,flipObj.speed);
|
||||
|
||||
$clone.queue(function(){
|
||||
if (!flipObj.dontChangeColor) {
|
||||
$this.css({backgroundColor: flipObj.toColor});
|
||||
}
|
||||
$this.css({visibility: "visible"});
|
||||
|
||||
var nC = newContent();
|
||||
if(nC){$this.html(nC);}
|
||||
$clone.remove();
|
||||
flipObj.onEnd($clone,$this);
|
||||
$this.removeData('flipLock');
|
||||
$clone.dequeue();
|
||||
});
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
1
libraries/framework/vendor/plugins/flip/jquery.flip.min.js
vendored
Normal file
1
libraries/framework/vendor/plugins/flip/jquery.flip.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(5($){5 L(a){a.3x.1F[a.3r]=3o(a.3n,10)+a.3l}6 j=5(a){3k({3i:"1E.1d.3d 3c 3b",38:a})};6 k=5(){7(/*@2S!@*/19&&(2Q 2N.1w.1F.2K==="2F"))};6 l={2C:[0,4,4],2B:[1u,4,4],2y:[1s,1s,2v],2u:[0,0,0],2t:[0,0,4],2s:[1q,1p,1p],2o:[0,4,4],2n:[0,0,B],2m:[0,B,B],2l:[1b,1b,1b],2j:[0,1c,0],2i:[2h,2g,1o],2e:[B,0,B],2d:[2c,1o,2b],2a:[4,1n,0],27:[24,21,20],1Z:[B,0,0],1Y:[1R,1P,1O],1N:[3s,0,Y],2f:[4,0,4],1Q:[4,2z,0],2E:[0,t,0],22:[26,0,28],29:[1u,1z,1n],2p:[2r,2w,1z],2x:[1h,4,4],2A:[1i,2G,1i],2L:[Y,Y,Y],2M:[4,2O,2W],33:[4,4,1h],34:[0,4,0],35:[4,0,4],36:[t,0,0],39:[0,0,t],3e:[t,t,0],3j:[4,1q,0],3m:[4,W,3t],1H:[t,0,t],1I:[t,0,t],1J:[4,0,0],1K:[W,W,W],1L:[4,4,4],1M:[4,4,0],9:[4,4,4]};6 m=5(a){U(a&&a.1j("#")==-1&&a.1j("(")==-1){7"1S("+l[a].1T()+")"}1U{7 a}};$.1V($.1W.1X,{w:L,x:L,u:L,v:L});$.1k.23=5(){7 V.1l(5(){6 a=$(V);a.1d(a.F(\'1m\'))})};$.1k.1d=5(i){7 V.1l(5(){6 c=$(V),3,$8,C,11,1f,1e=k();U(c.F(\'S\')){7 19}6 e={R:(5(a){2k(a){X"T":7"Z";X"Z":7"T";X"15":7"14";X"14":7"15";2q:7"Z"}})(i.R),y:m(i.A)||"#H",A:m(i.y)||c.z("12-A"),1r:c.N(),D:i.D||1t,Q:i.Q||5(){},K:i.K||5(){},P:i.P||5(){}};c.F(\'1m\',e).F(\'S\',1).F(\'2D\',e);3={s:c.s(),p:c.p(),y:m(i.y)||c.z("12-A"),1v:c.z("2H-2I")||"2J",R:i.R||"T",E:m(i.A)||"#H",D:i.D||1t,o:c.1x().o,n:c.1x().n,1y:i.1r||2P,9:"9",18:i.18||19,Q:i.Q||5(){},K:i.K||5(){},P:i.P||5(){}};1e&&(3.9="#2R");$8=c.z("16","2T").8(2U).F(\'S\',1).2V("1w").N("").z({16:"1g",2X:"2Y",n:3.n,o:3.o,2Z:0,30:31,"-32-1A-1B":"G G G #1C","-37-1A-1B":"G G G #1C"});6 f=5(){7{1D:3.9,1v:0,3a:0,w:0,u:0,v:0,x:0,M:3.9,O:3.9,I:3.9,J:3.9,12:"3f",3g:\'3h\',p:0,s:0}};6 g=5(){6 a=(3.p/1c)*25;6 b=f();b.s=3.s;7{"q":b,"1a":{w:0,u:a,v:a,x:0,M:\'#H\',O:\'#H\',o:(3.o+(3.p/2)),n:(3.n-a)},"r":{x:0,w:0,u:0,v:0,M:3.9,O:3.9,o:3.o,n:3.n}}};6 h=5(){6 a=(3.p/1c)*25;6 b=f();b.p=3.p;7{"q":b,"1a":{w:a,u:0,v:0,x:a,I:\'#H\',J:\'#H\',o:3.o-a,n:3.n+(3.s/2)},"r":{w:0,u:0,v:0,x:0,I:3.9,J:3.9,o:3.o,n:3.n}}};11={"T":5(){6 d=g();d.q.w=3.p;d.q.M=3.y;d.r.x=3.p;d.r.O=3.E;7 d},"Z":5(){6 d=g();d.q.x=3.p;d.q.O=3.y;d.r.w=3.p;d.r.M=3.E;7 d},"15":5(){6 d=h();d.q.u=3.s;d.q.I=3.y;d.r.v=3.s;d.r.J=3.E;7 d},"14":5(){6 d=h();d.q.v=3.s;d.q.J=3.y;d.r.u=3.s;d.r.I=3.E;7 d}};C=11[3.R]();1e&&(C.q.3p="3q(A="+3.9+")");1f=5(){6 a=3.1y;7 a&&a.1E?a.N():a};$8.17(5(){3.Q($8,c);$8.N(\'\').z(C.q);$8.13()});$8.1G(C.1a,3.D);$8.17(5(){3.P($8,c);$8.13()});$8.1G(C.r,3.D);$8.17(5(){U(!3.18){c.z({1D:3.E})}c.z({16:"1g"});6 a=1f();U(a){c.N(a)}$8.3u();3.K($8,c);c.3v(\'S\');$8.13()})})}})(3w);',62,220,'|||flipObj|255|function|var|return|clone|transparent||||||||||||||left|top|height|start|second|width|128|borderLeftWidth|borderRightWidth|borderTopWidth|borderBottomWidth|bgColor|css|color|139|dirOption|speed|toColor|data|0px|999|borderLeftColor|borderRightColor|onEnd|int_prop|borderTopColor|html|borderBottomColor|onAnimation|onBefore|direction|flipLock|tb|if|this|192|case|211|bt||dirOptions|background|dequeue|rl|lr|visibility|queue|dontChangeColor|false|first|169|100|flip|ie6|newContent|visible|224|144|indexOf|fn|each|flipRevertedSettings|140|107|42|165|content|245|500|240|fontSize|body|offset|target|230|box|shadow|000|backgroundColor|jquery|style|animate|purple|violet|red|silver|white|yellow|darkviolet|122|150|gold|233|rgb|toString|else|extend|fx|step|darksalmon|darkred|204|50|indigo|revertFlip|153||75|darkorchid|130|khaki|darkorange|47|85|darkolivegreen|darkmagenta|fuchsia|183|189|darkkhaki|darkgreen|switch|darkgrey|darkcyan|darkblue|cyan|lightblue|default|173|brown|blue|black|220|216|lightcyan|beige|215|lightgreen|azure|aqua|flipSettings|green|undefined|238|font|size|12px|maxHeight|lightgrey|lightpink|document|182|null|typeof|123456|cc_on|hidden|true|appendTo|193|position|absolute|margin|zIndex|9999|webkit|lightyellow|lime|magenta|maroon|moz|message|navy|lineHeight|error|plugin|js|olive|none|borderStyle|solid|name|orange|throw|unit|pink|now|parseInt|filter|chroma|prop|148|203|remove|removeData|jQuery|elem'.split('|'),0,{}))
|
||||
Reference in New Issue
Block a user