From 9966181c78a7f0b9fa14e37df224186e4763d988 Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Fri, 20 Jan 2012 00:17:19 +0100 Subject: Revert "Update example slideshow to use jquery only" This reverts commit 2b9c8aaefa38ded22efe3b3f4f8bd1eedf6ee6a5. --- slideshows/default/template/right.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 slideshows/default/template/right.js (limited to 'slideshows/default/template/right.js') diff --git a/slideshows/default/template/right.js b/slideshows/default/template/right.js new file mode 100644 index 0000000..1996290 --- /dev/null +++ b/slideshows/default/template/right.js @@ -0,0 +1,7 @@ +/** + * RightJS v2.2.3 - http://rightjs.org + * Released under the terms of MIT license + * + * Copyright (C) 2008-2011 Nikolay Nemshilov + */ +var RightJS=function(a,b,c,d,e,f,g,h,i){function cH(a,b,c,d){var e={},f=a.marginLeft.toFloat()||0,g=a.marginTop.toFloat()||0,h=c==="right",i=c==="bottom",j=c==="top"||i;d==="out"?(e[j?"height":"width"]="0px",h?e.marginLeft=f+b.x+"px":i&&(e.marginTop=g+b.y+"px")):(j?(e.height=b.y+"px",a.height="0px"):(e.width=b.x+"px",a.width="0px"),h?(e.marginLeft=f+"px",a.marginLeft=f+b.x+"px"):i&&(e.marginTop=g+"px",a.marginTop=g+b.y+"px"));return e}function cG(a,b,c){var d=a.clone().setStyle("position:absolute;z-index:-1;visibility:hidden").setWidth(a.size().x).setStyle(b),e;a.parent()&&a.insert(d,"before"),e=cF(d,c),d.remove();return e}function cF(a,b){var c=0,d=b.length,e=a.computedStyles(),f={},g;for(;cd?a.finish():(a.render(b(e/d)),e++)},c)}function cn(a){var b=I(a._);(ch[b]||[]).each("cancel"),(cg[b]||[]).splice(0)}function cm(a){var b=a.ch,c=b.shift();if(c=b[0])c[1].$ch=!0,c[1].start.apply(c[1],c[0])}function cl(a){var b=a.cr;b&&b.splice(b.indexOf(a),1)}function ck(a){a.cr&&a.cr.push(a)}function cj(a,b){var c=a.ch,d=a.options.queue;if(!c||a.$ch)return a.$ch=!1;d&&c.push([b,a]);return d&&c[0][1]!==a}function ci(a){var b=I((a.element||{})._||{});a.ch=cg[b]=cg[b]||[],a.cr=ch[b]=ch[b]||[]}function ce(a,b){a.stop(),this.send(b)}function cb(a,b){var d=a[0],e,f,g=ca(a),h=!c.keys(g).length;return(b.$listeners||[]).filter(function(a){return a.dr&&a.n===d&&(h||function(){for(var b in g)if(a.dr===b)for(e=0,f=g[b];e"+b+""+e[1];while(f--!==0)d=d.firstChild;b=d.childNodes;while(b.length!==0)bN.appendChild(b[0])}else for(var g=0,h=b.length,i;gb?1:a-1;c--)if(a.call(b,this[c],c,this))return this[c];return i};d.include({indexOf:k.indexOf||function(a,b){for(var c=b<0?h.max(0,this.length+b):b||0,d=this.length;c-1;b--)if(this[b]===a)return b;return-1},first:function(){return arguments.length?$(W,this,arguments):this[0]},last:function(){return arguments.length?$(X,this,arguments):this[this.length-1]},random:function(){return this.length===0?i:this[h.random(this.length-1)]},size:function(){return this.length},clean:function(){this.length=0;return this},empty:function(){return this.length===0},clone:function(){return this.slice(0)},each:function(){$(Q,this,arguments);return this},forEach:Q,map:function(){return $(T,this,arguments)},filter:function(){return $(R,this,arguments)},reject:function(){return $(S,this,arguments)},some:function(a){return $(U,this,a?arguments:[_])},every:function(a){return $(V,this,a?arguments:[_])},walk:function(){this.map.apply(this,arguments).forEach(function(a,b){this[b]=a},this);return this},merge:function(){for(var a=this.clone(),b,c=0;c0;b=h.random(d-1),c=a[--d],a[d]=a[b],a[b]=c){}return a},sort:function(a){return P.apply(this,a||!z(this[0])?arguments:[ba])},sortBy:function(){var a=Y(arguments,this);return this.sort(function(b,c){return ba(a[0].call(a[1],b),a[0].call(a[1],c))})},min:function(){return h.min.apply(h,this)},max:function(){return h.max.apply(h,this)},sum:function(){for(var a=0,b=0,c=this.length;b]+>/ig,"")},stripScripts:function(a){var b="",c=this.replace(/]*>([\s\S]*?)<\/script>/img,function(a,c){b+=c+"\n";return""});a===!0?t(b):x(a)&&a(b,c);return c},extractScripts:function(){var a="";this.stripScripts(function(b){a=b});return a},evalScripts:function(){this.stripScripts(!0);return this},camelize:function(){return this.replace(/(\-|_)+(.)?/g,function(a,b,c){return c?c.toUpperCase():""})},underscored:function(){return this.replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/\-/g,"_").toLowerCase()},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},includes:function(a){return this.indexOf(a)!=-1},startsWith:function(a,b){return(b!==!0?this.indexOf(a):this.toLowerCase().indexOf(a.toLowerCase()))===0},endsWith:function(a,b){return this.length-(b!==!0?this.lastIndexOf(a):this.toLowerCase().lastIndexOf(a.toLowerCase()))===a.length},toInt:function(a){return parseInt(this,a===i?10:a)},toFloat:function(a){return parseFloat(a===!0?this:this.replace(",",".").replace(/(\d)-(\d)/,"$1.$2"))}}),e.prototype.include=e.prototype.includes,f.include({bind:function(){var a=J(arguments),b=a.shift(),c=this;return function(){return c.apply(b,a.length!==0||arguments.length!==0?a.concat(J(arguments)):a)}},bindAsEventListener:function(){var a=J(arguments),b=a.shift(),c=this;return function(d){return c.apply(b,[d].concat(a).concat(J(arguments)))}},curry:function(){return this.bind.apply(this,[this].concat(J(arguments)))},rcurry:function(){var a=J(arguments),b=this;return function(){return b.apply(b,J(arguments).concat(a))}},delay:function(){var a=J(arguments),b=a.shift(),c=new g(setTimeout(this.bind.apply(this,[this].concat(a)),b));c.cancel=function(){clearTimeout(this)};return c},periodical:function(){var a=J(arguments),b=a.shift(),c=new g(setInterval(this.bind.apply(this,[this].concat(a)),b));c.stop=function(){clearInterval(this)};return c},chain:function(){var a=J(arguments),b=a.shift(),c=this;return function(){var d=c.apply(c,arguments);b.apply(b,a);return d}}}),g.include({times:function(a,b){for(var c=0;c=a;d--)b.call(c,d);return this},abs:function(){return h.abs(this)},round:function(a){return a?parseFloat(this.toFixed(a)):h.round(this)},ceil:function(){return h.ceil(this)},floor:function(){return h.floor(this)},min:function(a){return thisa?a:this+0}}),RegExp.escape=function(a){return(""+a).replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1")};var bb=j.Class=function(){var a=J(arguments).slice(0,2),b=a.pop()||{},c=a.pop(),d=arguments[2],e=function(){};!a.length&&!A(b)&&(c=b,b={}),!d&&c&&(c===bv||c.ancestors.include(bv))&&(d=bw()),d=s(d||function(){bh(this);return"initialize"in this?this.initialize.apply(this,arguments):this},bc),c=c||bb,e.prototype=c.prototype,d.prototype=new e,d.parent=c,d.prototype.constructor=d,d.ancestors=[];while(c)d.ancestors.push(c),c=c.parent;["extend","include"].each(function(a){a in b&&d[a].apply(d,N(b[a]))});return d.include(b)},bc={extend:function(){J(arguments).filter(A).each(function(a){s(this,be(a,!0)),bf(this,a,!0)},this);return this},include:function(){var a=[this].concat(this.ancestors);J(arguments).filter(A).each(function(b){c.each(be(b,!1),function(b,c){for(var d,e=0,f=a.length;e"),br.OLD=br.IE8L=bs=!0}catch(bu){}var bv=j.Wrapper=new bb({_:i,initialize:function(a){this._=a}});bv.Cache=q,bv.Cast=function(a){return a.tagName in bG?bG[a.tagName]:i};var bA=j.Document=new bb(bv,{win:function(){return bz(this._.defaultView||this._.parentWindow)}}),bB=bz(b),bC=j.Window=new bb(bv,{win:function(){return this},size:function(){var a=this._,b=a.document.documentElement;return a.innerWidth?{x:a.innerWidth,y:a.innerHeight}:{x:b.clientWidth,y:b.clientHeight}},scrolls:function(){var a=this._,b=a.document,c=b.body,d=b.documentElement;return a.pageXOffset||a.pageYOffset?{x:a.pageXOffset,y:a.pageYOffset}:c&&(c.scrollLeft||c.scrollTop)?{x:c.scrollLeft,y:c.scrollTop}:{x:d.scrollLeft,y:d.scrollTop}},scrollTo:function(a,b,c){var d=a,e=b,f=z(a)?null:E(a);f instanceof bF&&(a=f.position()),A(a)&&(e=a.y,d=a.x),A(c=c||b)&&j.Fx?(new cf.Scroll(this,c)).start({x:d,y:e}):this._.scrollTo(d,e);return this}}),bD=j.Event=new bb(bv,{type:null,which:null,keyCode:null,target:null,currentTarget:null,relatedTarget:null,pageX:null,pageY:null,initialize:by,stopPropagation:function(){this._.stopPropagation?this._.stopPropagation():this._.cancelBubble=!0,this.stopped=!0;return this},preventDefault:function(){this._.preventDefault?this._.preventDefault():this._.returnValue=!1;return this},stop:function(){return this.stopPropagation().preventDefault()},position:function(){return{x:this.pageX,y:this.pageY}},offset:function(){if(this.target instanceof bF){var a=this.target.position();return{x:this.pageX-a.x,y:this.pageY-a.y}}return null},find:function(a){if(this.target instanceof bv&&this.currentTarget instanceof bv){var b=this.target._,c=this.currentTarget.find(a,!0);while(b){if(c.indexOf(b)!==-1)return bz(b);b=b.parentNode}}return i}},by),bE=[],bF=j.Element=new bb(bv,{initialize:function(a,b){bJ(this,a,b)}},bx),bG=bF.Wrappers={},bH={},bI=function(a,c){return(a in bH?bH[a]:bH[a]=b.createElement(a)).cloneNode(!1)};bs&&(bI=function(a,c){a==="input"&&c!==i&&(a='',"after"),E(this.id).on("load",this.onLoad.bind(this))},send:function(){this.form.set("target",this.id).submit()},onLoad:function(){this.status=200,this.readyState=4,this.form.set("target","");try{this.responseText=a[this.id].document.documentElement.innerHTML}catch(b){}this.onreadystatechange()},abort:function(){E(this.id).set("src","about:blank")}}),cd.JSONP=new bb({include:cd.Dummy,prefix:"jsonp",initialize:function(a){this.xhr=a,this.name=this.prefix+(new Date).getTime(),this.param=(y(a.jsonp)?a.jsonp:"callback")+"="+this.name,this.script=G("script",{charset:a.encoding,async:a.async})},open:function(a,b,c){this.url=b,this.method=a},send:function(b){a[this.name]=this.finish.bind(this),this.script.set("src",this.url+(this.url.include("?")?"&":"?")+this.param+"&"+b).insertTo(F("script").last(),"after")},finish:function(a){this.status=200,this.readyState=4,this.xhr.json=this.xhr.responseJSON=a,this.onreadystatechange()},abort:function(){a[this.name]=function(){}}});var cf=j.Fx=new bb(bj,{extend:{EVENTS:H("start finish cancel"),Durations:{"short":200,normal:400,"long":800},Options:{fps:bs?40:60,duration:"normal",transition:"Sin",queue:!0},Transitions:{Sin:function(a){return-(h.cos(h.PI*a)-1)/2},Cos:function(a){return h.asin((a-.5)*2)/h.PI+.5},Exp:function(a){return h.pow(2,8*(a-1))},Log:function(a){return 1-h.pow(2,-8*a)},Lin:function(a){return a}}},initialize:function(a,b){this.$super(b),this.element=E(a),ci(this)},start:function(){if(cj(this,arguments))return this;var a=this.options,b=cf.Durations[a.duration]||a.duration,c=cf.Transitions[a.transition]||a.transition,d=(b/1e3*this.options.fps).ceil(),e=(1e3/this.options.fps).round();ck(this),this.prepare.apply(this,arguments),co(this,c,e,d);return this.fire("start",this)},finish:function(){cp(this),cl(this),this.fire("finish"),cm(this);return this},cancel:function(){cp(this),cl(this);return this.fire("cancel")},prepare:function(){},render:function(){}}),cg=[],ch=[];e.COLORS={maroon:"#800000",red:"#ff0000",orange:"#ffA500",yellow:"#ffff00",olive:"#808000",purple:"#800080",fuchsia:"#ff00ff",white:"#ffffff",lime:"#00ff00",green:"#008000",navy:"#000080",blue:"#0000ff",aqua:"#00ffff",teal:"#008080",black:"#000000",silver:"#c0c0c0",gray:"#808080",brown:"#a52a2a"},e.include({toHex:function(){var a=/^#(\w)(\w)(\w)$/.exec(this);a?a="#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]:(a=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(this))?a="#"+a.slice(1).map(function(a){a=(a-0).toString(16);return a.length==1?"0"+a:a}).join(""):a=e.COLORS[this]||this;return a},toRgb:function(a){var b=/#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})/i.exec(this.toHex()||"");b&&(b=b.slice(1).map("toInt",16),b=a?b:"rgb("+b+")");return b}}),bF.include({stop:function(){cn(this);return this},hide:function(a,b){return a&&this.visible()?cq(this,a,["out",b]):this.$super()},show:function(a,b){return a&&!this.visible()?cq(this,a,["in",b]):this.$super()},toggle:function(a,b){return a?cq(this,a,["toggle",b]):this.$super()},remove:function(a,b){return a&&this.visible()?cq(this,a,["out",s(b||{},{onFinish:this.$super.bind(this)})]):this.$super()},morph:function(a,b){return cq(this,"morph",[a,b||{}])},highlight:function(){return cq(this,"highlight",arguments)},fade:function(){return cq(this,"fade",arguments)},slide:function(){return cq(this,"slide",arguments)},scroll:function(a,b){return cq(this,"scroll",[a,b||{}])},scrollTo:function(a,b){return A(b)?this.scroll(a,b):this.$super.apply(this,arguments)}});var cr=["WebkitT","OT","MozT","MsT","t"].first(function(a){return a+"ransition"in o.style}),cs=cr+"ransition",ct=cs+"Property",cu=cs+"Duration",cv=cs+"TimingFunction",cw={Sin:"cubic-bezier(.3,0,.6,1)",Cos:"cubic-bezier(0,.3,.6,0)",Log:"cubic-bezier(0.6,.3,.8)",Exp:"cubic-bezier(.6,0,.8,.3)",Lin:"cubic-bezier(0,0,1,1)"};cf.Options.engine=cr===i||bp?"javascript":"native",cf.Morph=new bb(cf,{prepare:function(a){if(this.options.engine==="native"&&cr!==i)this.render=this.transition=function(){},cx.call(this,a);else{var b=cA(a),c=cF(this.element,b),d=cG(this.element,a,b);cE(this.element,c,d),this.before=cD(c),this.after=cD(d)}},render:function(a){var b,c,d,e=this.element._.style,f,g,i;for(f in this.after){b=this.before[f],c=this.after[f];for(g=0,i=c.length;g