uranium-rails 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +36 -0
- data/lib/generators/uranium-rails/install/USAGE +8 -0
- data/lib/generators/uranium-rails/install/install_generator.rb +38 -0
- data/lib/uranium-rails.rb +1 -0
- data/lib/uranium-rails/assert_select.rb +25 -0
- data/lib/uranium-rails/rails.rb +8 -0
- data/lib/uranium-rails/rails/engine.rb +6 -0
- data/lib/uranium-rails/rails/railtie.rb +13 -0
- data/vendor/assets/javascripts/uranium-pretty.js +1381 -0
- data/vendor/assets/javascripts/uranium.js +39 -0
- metadata +54 -0
@@ -0,0 +1,39 @@
|
|
1
|
+
(function(c){function p(b,f,j){var e={},g="[data-ur-set='"+f+"']",z="data-ur-"+f+"-component";c(b).find("["+z+"]").each(function(){if(!c(this).data("urCompInit")){var b=c(this).attr("data-ur-id")?c(this):c(this).closest(g);if(b[0]&&!b.data("urInit")){c(this).data("urCompInit",!0);var f=b.attr("data-ur-id");f||(f=G(),b.attr("data-ur-id",f));e[f]=e[f]||{};if(b.is(g))e[f].set=b[0];j?j(e[f],this):(b=c(this).attr(z),e[f][b]=e[f][b]||[],e[f][b].push(this))}}});return e}var G=function(){var c=0;return function(){return++c}}(),
|
2
|
+
m={},B="ontouchstart"in window,H=B?"touchstart":"mousedown",I=B?"touchmove":"mousemove",J=B?"touchend":"mouseup";m.toggler=function(b){b=p(b,"toggler");c.each(b,function(b,j){j.button||c.error("no button found for toggler with id="+b);j.content||c.error("no content found for toggler with id="+b);var e=c(j.button).attr("data-ur-state")||"disabled";c(j.button).add(j.content).attr("data-ur-state",e);c(j.button).click(function(e){e.stopPropagation();e=c(j.button).attr("data-ur-state")=="enabled"?"disabled":
|
3
|
+
"enabled";c(j.button).add(j.content).attr("data-ur-state",e)});c(j.set).data("urInit",!0)})};m.tabs=function(b){var f=p(b,"tabs",function(b,e){var g=c(e).attr("data-ur-tab-id");b.tabs=b.tabs||{};b.tabs[g]=b.tabs[g]||{};var f=c(e).attr("data-ur-tabs-component");b.tabs[g][f]=b.tabs[g][f]||[];b.tabs[g][f].push(e)});c.each(f,function(b,e){e.closeable=c(e.set).attr("data-ur-closeable")=="true";c.each(e.tabs,function(){var e=c(this.button).attr("data-ur-state")||"disabled";c(this.button).add(this.content).attr("data-ur-state",
|
4
|
+
e)});c.each(e.tabs,function(b,j){c(j.button).click(function(){var b=c(this).attr("data-ur-state")=="enabled";c.each(e.tabs,function(){c(this.button).add(this.content).attr("data-ur-state","disabled")});(!b||!f.closeable)&&c(j.button).add(j.content).attr("data-ur-state","enabled")})});c(e.set).data("urInit",!0)})};m.inputClear=function(b){b=p(b,"input-clear");c.each(b,function(b,j){var e=c("<div class='data-ur-input-clear-ex'></div>").hide();c(j.set).append(e);e.bind(B?"touchstart":"click",function(){g[0].value=
|
5
|
+
"";g[0].focus()}).bind("touchend",function(){g[0].blur()});var g=c(j.set).find("input");g.bind("focus",function(){g[0].value!=""&&e.show()}).bind("keydown",function(){e.show()}).bind("blur",function(){setTimeout(function(){e.hide()},150)});c(j.set).data("urInit",!0)})};m.geoCode=function(b){b=p(b,"reverse-geocode",function(b,j){b.elements=b.elements||{};b.elements[c(j).attr("data-ur-reverse-geocode-component")]=j});c.each(b,function(b,j){function e(b,e,g){var f=0,j=null,q=null,r=null;switch(c(b).attr("data-ur-reverse-geocode-component")){case "rg-city":q=
|
6
|
+
"locality";break;case "rg-street":q="street_number";break;case "rg-zip":q="postal_code";break;case "rg-state":q="administrative_area_level_1";break;case "rg-country":q="country"}for(var r=e[0],d=null,a=r.address_components.length,i=0;i<a;i++)for(var h=r.address_components[i].types.length,k=0;k<h;k++)if(d=r.address_components[i].types[k],q==d){switch(d){case "street_number":f=i;j=i+1;break;case "locality":f=i;break;case "postal_code":f=i;break;case "administrative_area_level_1":f=i;break;case "country":f=
|
7
|
+
i}break}if(g==="input")b.value=j===null?e[0].address_components[f].long_name:e[0].address_components[f].long_name+" "+e[0].address_components[j].long_name;else if(g==="select"){e=e[0].address_components[f];g=0;for(f=b.length;g<f;g++)if(b[g].value===e.long_name||b[g].value.toUpperCase()===e.short_name)b.selectedIndex=g}}var g=this.set;c(g).attr("data-ur-callback");var z=c(g).attr("data-ur-error-callback"),m,E,F;this.setupCallbacks=function(){F=this;var e=c(this.elements).filter("[data-ur-reverse-geocode-component='rg-button']");
|
8
|
+
e.length>0?c(e).bind("click",function(c){return function(){c.geocodeInit()}}(this)):(console.warn("no button for triggering reverse geocoding present"),this.geocodeInit())};this.geoSuccess=function(c){c={lat:c.coords.latitude,lng:c.coords.longitude};this.codeLatLng(c.lat,c.lng)};this.geoError=function(c){console.error("Ur geolocation error -- Error Getting Your Coordinates!");switch(c.code){case c.TIMEOUT:console.error("Ur geolocation error -- Timeout");break;case c.POSITION_UNAVAILABLE:console.error("Ur geolocation error -- Position unavailable");
|
9
|
+
break;case c.PERMISSION_DENIED:console.error("Ur geolocation error -- Permission denied");break;case c.UNKNOWN_ERROR:console.error("Ur geolocation error -- Unknown error")}z!==void 0&&eval(z)};this.geoDenied=function(){console.error("Ur geolocation error -- User Denied Geolocation")};this.codeLatLng=function(c,b){var f=new google.maps.LatLng(c,b),g=this;m.geocode({latLng:f},function(c,b){if(b==google.maps.GeocoderStatus.OK)if(c[1]){E=c;var f=F.elements;for(elm in f)f[elm].localName==="input"?e(f[elm],
|
10
|
+
E,"input"):f[elm].localName==="select"&&e(f[elm],E,"select");g.callback!==void 0&&eval(g.callback);return c}else console.error("Geocoder failed due to: "+b)})};this.geocodeInit=function(){navigator.geolocation&&(m=new google.maps.Geocoder,navigator.geolocation.getCurrentPosition(function(c){return function(b){c.geoSuccess(b)}}(this),function(c){return function(b){c.geoError(b)}}(this),this.geoDenied))};UrGeocode=function(c){return function(){c.setupCallbacks()}}(this);g=document.createElement("script");
|
11
|
+
g.type="text/javascript";g.src="https://maps.googleapis.com/maps/api/js?sensor=true&callback=UrGeocode";c("head").append(g);c(j.set).data("urInit",!0)})};m.zoom=function(b){function f(c,b){return Math.max(Math.min(b[0],c),b[1])}function j(b){function g(){d.canvasWidth=d.canvasWidth||d.container.offsetWidth;d.canvasHeight=d.canvasHeight||d.container.offsetHeight;d.width=d.width||parseInt(a.attr("width"))||parseInt(a.css("width"))||d.img.width;d.height=d.height||parseInt(a.attr("height"))||parseInt(a.css("height"))||
|
12
|
+
d.img.height;d.bigWidth=parseInt(a.attr("data-ur-width"))||d.img.naturalWidth;d.bigHeight=parseInt(a.attr("data-ur-height"))||d.img.naturalHeight;if(a.attr("data-ur-width")&&a.attr("data-ur-height")||a.attr("src")==a.attr("data-ur-src"))d.prescale=!0;d.ratio=d.bigWidth/d.width;k=(d.canvasWidth-d.bigWidth)/2;v=(d.canvasHeight-d.bigHeight)/2}function j(a){if(a.target==d.img){A=!1;n=a.pageX;l=a.pageY;C=!0;var c=a.originalEvent.touches;if(c)n=c[0].pageX,l=c[0].pageY;c=d.img.style;window.WebKitCSSMatrix?
|
13
|
+
(c=new WebKitCSSMatrix(c.webkitTransform),x=c.m41,y=c.m42):(c=c.MozTransform||c.msTransform||c.transform||"translate(0, 0)",c=c.replace(/.*?\(|\)/,"").split(","),x=parseInt(c[0]),y=parseInt(c[1]));a.preventDefault();a.stopPropagation()}}function t(a){if(C&&a.target==d.img){a.preventDefault();a.stopPropagation();var c=a.pageX,b=a.pageY;if(a=a.originalEvent.touches)c=a[0].pageX,b=a[0].pageY;c-=n;b-=l;if(Math.abs(c)>5||Math.abs(b)>5)A=!0;c=f(x+c,[-k,k]);b=f(y+b,[-v,v]);r(c,b,d.ratio)}}function p(a){A||
|
14
|
+
d.zoomOut();a.preventDefault();a.stopPropagation();C=!1;A=!0}function u(){if(d.state=="enabled-in")a.css({webkitTransitionDelay:"",MozTransitionDelay:"",OTransitionDelay:"",transitionDelay:""}),d.img.src=a.attr("data-ur-src"),e.indexOf(d.img.getAttribute("data-ur-src"))==-1&&setTimeout(function(){e.indexOf(d.img.getAttribute("data-ur-src"))==-1&&i.attr("data-ur-state","enabled")},16),d.state="enabled",d.container.setAttribute("data-ur-state",d.state),c(d.container).on(H,j).on(I,t).on(J,p);else if(d.state==
|
15
|
+
"enabled-out")d.state="disabled",d.container.setAttribute("data-ur-state",d.state),c(d.container).unbind(H,j).unbind(I,t).unbind(J,p)}function q(a,c){h.attr("data-ur-state","enabled");d.state="enabled-in";d.container.setAttribute("data-ur-state",d.state);r(a?a:0,c?c:0,d.ratio)}function r(c,d,b){var e="";c!=void 0&&(e=m+c+"px, "+d+"px"+E);b!=void 0&&(e+=z?" scale("+b+")":" scale3d("+b+", "+b+", 1)");return a.css({webkitTransform:e,MozTransform:e,msTransform:e,transform:e})}var d=this;this.container=
|
16
|
+
b.set;this.img=b.img[0];this.prescale=!1;this.canvasWidth=this.canvasHeight=this.bigWidth=this.bigHeight=this.width=this.height=0;this.ratio=1;this.state="disabled";this.button=b.button;this.idler=b.loading;var a=c(this.img),i=c(this.idler),h=c(this.button),k,v,s,o,x=0,y=0,n=0,l=0,C=!1,A=!0;e.push(a.attr("src"));this.zoomIn=function(c){if(d.state=="disabled"){if(!d.width)g(),d.img.style.width=d.width+"px",d.img.style.height=d.height+"px";var b=c.pageX,e=c.pageY;if(c.touches)b=c.touches[0].pageX,e=
|
17
|
+
c.touches[0].pageY;s=c.offsetX;o=c.offsetY;if(s==void 0||o==void 0)c=d.img.getBoundingClientRect(),s=b-c.left,o=e-c.top;d.prescale?(b=f(d.bigWidth/2-d.ratio*s,[-k,k]),e=f(d.bigHeight/2-d.ratio*o,[-v,v]),q(b,e)):(d.state="enabled-in",d.img.src=a.attr("data-ur-src"),setTimeout(function(){d.prescale||i.attr("data-ur-state","enabled")},0))}};this.zoomOut=function(){if(d.state=="enabled")h.attr("data-ur-state","disabled"),d.state="enabled-out",d.container.setAttribute("data-ur-state",d.state),r(0,0,1)};
|
18
|
+
d.container.getAttribute("data-ur-touch")!="disabled"&&c(d.container).click(d.zoomIn);a.load(function(){a.attr("src")==a.attr("data-ur-src")&&e.push(a.attr("src"));i.attr("data-ur-state","disabled");if(!d.prescale&&d.state=="enabled-in"){d.prescale=!0;g();var c=f(d.bigWidth/2-d.ratio*s,[-k,k]),b=f(d.bigHeight/2-d.ratio*o,[-v,v]);a.css({webkitTransitionDelay:"0.3s",MozTransitionDelay:"0.3s",OTransitionDelay:"0.3s",transitionDelay:"0.3s"});q(c,b)}});this.zoom=function(){if(d.state=="disabled"){if(!d.width)g(),
|
19
|
+
d.img.style.width=d.width+"px",d.img.style.height=d.height+"px";d.prescale?q(0,0):(d.state="enabled-in",d.img.src=a.attr("data-ur-src"),setTimeout(function(){e.indexOf(d.img.getAttribute("data-ur-src"))==-1&&i.attr("data-ur-state","enabled")},0))}else d.zoomOut()};c(d.button).on(B?"touchstart":"click",d.zoom);c.each(["webkitTransitionEnd","transitionend","oTransitionEnd"],function(c,b){a.on(b,u)});this.reset=function(){d.prescale=!1;d.width=d.height=0;a.css({width:"",height:""});r();d.state="enabled-out";
|
20
|
+
u();i.attr("data-ur-state","disabled");h.attr("data-ur-state","disabled")}}var b=p(b,"zoom"),e=[],g=/Android [12]|Opera/.test(navigator.userAgent),z=g,m=g?"translate(":"translate3d(",E=g?")":", 0)";c.each(b,function(b,e){Uranium.zoom[b]=new j(this);c(e.set).data("urInit",!0)})};m.carousel=function(b){function f(c){c.preventDefault();c.stopPropagation()}function j(b){function g(){a.options.translate3d=a.options.translate3d&&d();a.options.translate3d||(K="translate(",L=")");h.each(function(b,d){if(c(d).attr("data-ur-state")==
|
21
|
+
"active")return a.itemIndex=b,!1});j();p(a.options.center?a.itemIndex+a.options.cloneLength:a.itemIndex);m();a.update();c(a.scroller).on("dragstart",function(){return!1});a.options.touch&&c(a.scroller).on(H,F).on(I,G).on(J,O).click(function(c){a.flag.click||f(c)});a.button.prev.click(function(){t(1)});a.button.next.click(function(){t(-1)});if("onorientationchange"in window)c(window).on("orientationchange",a.update);else c(window).on("resize",function(){w!=i.outerWidth()&&(a.update(),setTimeout(a.update,
|
22
|
+
100))});h.find("img").addBack("img").load(a.update);a.autoscrollStart()}function j(){if(a.options.infinite){if(a.options.cloneLength==0)if(a.options.fill)a.options.cloneLength=a.options.center?a.options.fill-1:a.options.fill;else if(a.options.center){for(var b=[0,0],d=w/2+h[n].offsetWidth/2,e=n;d>0;e=(e-1+a.count)%a.count)d-=h[e].offsetWidth,b[0]++;d=w/2+h[0].offsetWidth/2;for(e=0;d>0;e=(e+1)%a.count)d-=h[e].offsetWidth,b[1]++;a.options.cloneLength=Math.max(b[0],b[1])}else{d=w;for(e=0;d>0;)d-=h[e].offsetWidth,
|
23
|
+
a.options.cloneLength++,e=(e+1)%h.length}i.attr("data-ur-clones",a.options.cloneLength);b=document.createDocumentFragment();for(e=0;e<a.options.cloneLength;e++){var f=e%a.count,f=h.eq(f).clone(!0).attr("data-ur-clone",f).attr("data-ur-state","inactive");b.appendChild(f[0])}h.parent().append(b);if(a.options.center){b=document.createDocumentFragment();for(e=d=a.count-a.options.cloneLength%a.count;e<d+a.options.cloneLength;e++)f=e%a.count,f=h.eq(f).clone(!0).attr("data-ur-clone",f).attr("data-ur-state",
|
24
|
+
"inactive"),b.appendChild(f[0]);h.parent().prepend(b)}h=c(a.scroller).find("[data-ur-carousel-component='item']");n=h.length-1}else a.options.cloneLength=0,i.attr("data-ur-clones",0)}function m(){if(a.dots){var b=c(a.dots).find("[data-ur-carousel-component='dot']");if(b.length!=a.count){b.remove();for(var b=c("<div data-ur-carousel-component='dot'>"),d=document.createDocumentFragment(),e=0;e<a.count;e++){var f=b.clone().attr("data-ur-state",e==a.itemIndex?"active":"inactive");d.appendChild(f[0])}c(a.dots).append(d)}}}
|
25
|
+
function p(b){if(b!==void 0){a.itemIndex=b;if(a.itemIndex<0)a.itemIndex=0;else if(a.itemIndex>n)a.itemIndex=n;b=a.itemIndex;a.options.infinite&&a.options.center&&(b=a.itemIndex-a.options.cloneLength);b%=a.count;c(a.counter).html(b+1+" of "+a.count);h.attr("data-ur-state","inactive");h.eq(a.itemIndex).attr("data-ur-state","active");c(a.dots).find("[data-ur-carousel-component='dot']").attr("data-ur-state","inactive").eq(b).attr("data-ur-state","active");a.options.infinite?c([a.button.prev,a.button.next]).attr("data-ur-state",
|
26
|
+
"enabled"):(c(a.button.prev).attr("data-ur-state",a.itemIndex==0?"disabled":"enabled"),c(a.button.next).attr("data-ur-state",a.itemIndex==a.count-Math.max(a.options.fill,1)?"disabled":"enabled"))}}function F(c){a.options.verticalScroll||f(c);a.autoscrollStop();a.flag.touched=!0;a.flag.lock=null;a.flag.click=!0;s=v=k=q(c);D=a.translate}function G(c){if(a.flag.touched){v=k;k=q(c);if(Math.abs(s.y-k.y)+Math.abs(s.x-k.x)>0)a.flag.click=!1;if(B&&a.options.verticalScroll){var b=Math.abs((s.y-k.y)/(s.x-k.x));
|
27
|
+
if(a.flag.lock){if(a.flag.lock=="y")return}else if(b>1.2){a.flag.lock="y";return}else if(b<=1.2)a.flag.lock="x";else return}f(c);if(k!==null){var c=D+(k.x-s.x),d=-c;a.options.center&&(d+=w/2);h.each(function(c,b){var e=b.offsetLeft;if(e+b.offsetWidth>d)return a.itemIndex=c,o=(d-e)/b.offsetWidth,a.options.center&&(o-=0.5),!1});a.options.infinite&&(a.options.center?a.itemIndex<a.options.cloneLength?(D-=l,c-=l,a.itemIndex+=a.count):a.itemIndex>=a.count+a.options.cloneLength&&(D+=l,c+=l,a.itemIndex-=
|
28
|
+
a.count):o<0?(D-=l,c-=l,a.itemIndex+=a.count,b=h[a.itemIndex],o=(-c-b.offsetLeft)/b.offsetWidth):a.itemIndex>=a.count&&(b=h[a.count].offsetLeft-h[0].offsetLeft,D+=b,c+=b,a.itemIndex-=a.count));u(c)}}}function O(c){if(a.flag.touched){if(!a.flag.click||a.flag.lock)f(c);else if(c.target.tagName=="AREA")location.href=c.target.href;a.flag.touched=!1;c=k.x-v.x;a.options.center?c<0&&o>0?t(-1):c>0&&o<0?t(1):t(0):t(c<0?-1:0)}}function t(c){a.autoscrollStop();clearTimeout(A);var b=a.itemIndex-c;a.options.infinite||
|
29
|
+
(b=a.options.fill>0?r(b,[0,a.count-a.options.fill]):r(b,[0,n]));if(a.options.infinite){var d=a.translate;if(a.options.center)if(b<a.options.cloneLength)u(d-l),b+=a.count,a.itemIndex=b+c;else{if(b>=a.count+a.options.cloneLength)u(d+l),b-=a.count,a.itemIndex=b+c}else if(b<0)u(d-l),b+=a.count,a.itemIndex=b+c;else if(b>a.count)u(d+l),b-=a.count,a.itemIndex=b+c}x=h[b];i.trigger("slidestart.ur.carousel",{index:b});setTimeout(function(){P();p(b)},0)}function P(){function c(){if(!a.flag.touched){var b=a.translate,
|
30
|
+
d=y-b;d-=d/a.options.speed>=0?Math.floor(d/a.options.speed):Math.ceil(d/a.options.speed);Math.abs(d)<0.01&&(d=0);u(b+d);a.flag.snapping=d!=0;a.flag.snapping?A=setTimeout(c,16):(a.options.infinite&&!a.options.center&&a.itemIndex>=a.count&&(u(a.translate+l),a.itemIndex-=a.count),o=0,a.autoscrollStart(),i.trigger("slideend.ur.carousel",{index:a.itemIndex}))}}y=-x.offsetLeft;a.options.center&&(y+=Math.floor((w-x.offsetWidth)/2));c()}function u(b){a.translate=b;b=K+b+"px, 0px"+L;c(a.scroller).css({webkitTransform:b,
|
31
|
+
MozTransform:b,msTransform:b,transform:b})}function q(a){var c=a.originalEvent.touches,a=c&&c[0]||a;return{x:a.clientX,y:a.clientY}}function r(a,c){return Math.min(Math.max(c[0],a),c[1])}function d(){var a=c("<a>").css({webkitTransform:"translate3d(0, 0, 0)",MozTransform:"translate3d(0, 0, 0)",msTransform:"translate3d(0, 0, 0)",transform:"translate3d(0, 0, 0)"}),b=a.css("webkitTransform"),d=a.css("MozTransform"),e=a.css("msTransform"),a=a.css("transform");return(b+d+e+a).indexOf("(")!=-1}var a=this;
|
32
|
+
a.container=b.set;a.scroller=b.scroll_container;a.scroller||c.error("carousel missing item components");a.items=b.item||[];a.button={prev:c(b.button).filter("[data-ur-carousel-button-type='prev']"),next:c(b.button).filter("[data-ur-carousel-button-type='next']")};a.counter=b.count;a.dots=b.dots;a.flag={click:!1,snapping:!1,lock:null,touched:!1};a.options={autoscroll:!1,autoscrollDelay:5E3,autoscrollForward:!0,center:!1,cloneLength:0,fill:0,infinite:!0,speed:1.1,translate3d:!0,touch:!0,verticalScroll:!0};
|
33
|
+
a.count=a.items.length;a.itemIndex=0;a.translate=0;var i=c(a.container),h=c(a.items),k=null,v,s={x:0,y:0},o=0,x=h[0],y,n=a.count-1,l,C,A,w=i.outerWidth(),D=null,K="translate3d(",L=", 0px)";a.update=function(){var b=h.length;h=c(a.scroller).find("[data-ur-carousel-component='item']");if(b!=h.length){a.items=h.filter(":not([data-ur-clone])").toArray();a.count=a.items.length;n=h.length-1;h.each(function(b,d){if(c(d).attr("data-ur-state")=="active")return a.itemIndex=b,!1});if(a.itemIndex>=h.length-a.options.cloneLength)a.itemIndex=
|
34
|
+
n-a.options.cloneLength,h.eq(a.itemIndex).attr("data-ur-state","active");c.contains(a.scroller,x)||(x=h[a.itemIndex]);m();p(a.options.center?a.itemIndex+a.options.cloneLength:a.itemIndex)}w=i.outerWidth();var b=0,d=[];if(a.options.fill>0)for(var e=w,f=a.options.fill;f>0;f--){var g=Math.round(e/f);d.push(g);e-=g}for(f=l=0;f<h.length;f++)if(a.options.fill>0?(g=d[f%a.options.fill],h.eq(f).outerWidth(g),b+=g):b+=h[f].offsetWidth,f<=n-a.options.cloneLength&&f>=(a.options.center?a.options.cloneLength:0))l+=
|
35
|
+
h[f].offsetWidth;c(a.scroller).width(b);b=h[a.itemIndex];d=-(b.offsetLeft+o*b.offsetWidth);y=-x.offsetLeft;a.options.center&&(d+=Math.floor((w-b.offsetWidth)/2),y+=Math.floor((w-x.offsetWidth)/2));u(d)};a.autoscrollStart=function(){a.options.autoscroll&&(C=setTimeout(function(){w!=0?!a.options.infinite&&a.itemIndex==n&&a.options.autoscrollForward?a.jumpToIndex(0):!a.options.infinite&&a.itemIndex==0&&!a.options.autoscrollForward?a.jumpToIndex(n):t(a.options.autoscrollForward?-1:1):a.autoscrollStart()},
|
36
|
+
a.options.autoscrollDelay))};a.autoscrollStop=function(){clearTimeout(C)};a.jumpToIndex=function(c){t(a.itemIndex-c)};(function(){if(/Android [12]/.test(navigator.userAgent)){if((i.attr("data-ur-android3d")||i.attr("data-ur-translate3d"))!="enabled"){a.options.translate3d=!1;var b=parseFloat(i.attr("data-ur-speed"));a.options.speed=b>1?b:1.3}}else a.options.translate3d=i.attr("data-ur-translate3d")!="disabled";i.attr("data-ur-translate3d",a.options.translate3d?"enabled":"disabled");i.attr("data-ur-speed",
|
37
|
+
a.options.speed);b=parseInt(i.attr("data-ur-fill"));if(b>0)a.options.fill=b;i.attr("data-ur-fill",a.options.fill);if(b=i.attr("data-ur-clones"))a.options.cloneLength=parseInt(b);i.attr("data-ur-clones",a.options.cloneLength);b=parseInt(i.attr("data-ur-autoscroll-delay"));if(b>=0)a.options.autoscrollDelay=b;i.attr("data-ur-autoscroll-delay",a.options.autoscrollDelay);a.options.autoscrollForward=i.attr("data-ur-autoscroll-dir")!="prev";i.attr("data-ur-autoscroll-dir",a.options.autoscrollForward?"next":
|
38
|
+
"prev");c.each(["autoscroll","center","infinite","touch","verticalScroll"],function(c,b){var d="data-ur-"+b.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}),e=i.attr(d);e=="enabled"?a.options[b]=!0:e=="disabled"&&(a.options[b]=!1);i.attr(d,a.options[b]?"enabled":"disabled")})})();var M=!1;a.options.infinite&&!a.options.fill&&a.options.cloneLength==0&&h.width(function(a,b){b==0&&(M=!0)});if(M){var b=h.find("img").addBack("img"),N=b.length;N>0?b.load(function(){--N==0&&g()}):c(window).load(g)}else g()}
|
39
|
+
b=p(b,"carousel");c.each(b,function(b,f){c(f.buttons).each(function(){var f=c(this).attr("data-ur-carousel-button-type");f||c.error("malformed carousel button type for carousel with id: "+b+".");c(this).attr("data-ur-state",f=="prev"?"disabled":"enabled")});Uranium.carousel[b]=new j(f);c(f.set).data("urInit",!0);c(f.set).attr("data-ur-state","enabled")})};window.Uranium={};c.each(m,function(b){Uranium[b]={}});c.fn.Uranium=function(){var b=this;c.each(m,function(){this(b)});return this};c(document).ready(function(){c("body").Uranium()})})(jQuery);
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: uranium-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sapna Jadon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-24 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: uranium-rails is rails implementation of uranium JS which is a simple,
|
14
|
+
lightweight Javascript interaction library written in jQuery.
|
15
|
+
email: jadon.sapna11@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/generators/uranium-rails/install/install_generator.rb
|
21
|
+
- lib/generators/uranium-rails/install/USAGE
|
22
|
+
- lib/uranium-rails/assert_select.rb
|
23
|
+
- lib/uranium-rails/rails/engine.rb
|
24
|
+
- lib/uranium-rails/rails/railtie.rb
|
25
|
+
- lib/uranium-rails/rails.rb
|
26
|
+
- lib/uranium-rails.rb
|
27
|
+
- vendor/assets/javascripts/uranium.js
|
28
|
+
- vendor/assets/javascripts/uranium-pretty.js
|
29
|
+
- README.md
|
30
|
+
homepage:
|
31
|
+
licenses: []
|
32
|
+
metadata: {}
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.3.6
|
47
|
+
requirements: []
|
48
|
+
rubyforge_project:
|
49
|
+
rubygems_version: 2.1.3
|
50
|
+
signing_key:
|
51
|
+
specification_version: 4
|
52
|
+
summary: uranium-rails is rails implementation of uranium JS which is a simple, lightweight
|
53
|
+
Javascript interaction library written in jQuery.
|
54
|
+
test_files: []
|