oridomi-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +20 -0
- data/README.md +99 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/oridomi-development.js +1355 -0
- data/app/assets/javascripts/oridomi.js +1 -0
- data/lib/oridomi-rails.rb +1 -0
- data/lib/oridomi/rails.rb +6 -0
- data/lib/oridomi/rails/engine.rb +7 -0
- data/lib/oridomi/rails/version.rb +6 -0
- data/oridomi-rails.gemspec +25 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +21 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +8 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/log/test.log +26 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/integration/oridomi_rails_integration_test.rb +13 -0
- data/test/test_helper.rb +13 -0
- metadata +225 -0
@@ -0,0 +1 @@
|
|
1
|
+
(function(){"use strict";var t,e,n,i,s,o,r,a,h,l,c,u,p,f,d,_,g,y,m,v,b,T,O,w,k,E,x,S,C=function(t,e){return function(){return t.apply(e,arguments)}},L=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},A=[].slice;g=!0,w=function(t){return"undefined"!=typeof console&&null!==console&&console.warn("OriDomi: Missing support for `"+t+"`."),g=!1},E=function(t){var e,n,i,s;for(i=0,s=v.length;s>i;i++)if(n=v[i],null!=k.style[e=n+a(t)])return e;return null!=k.style[t]?t:!1},n=function(t,e){var n,i,s;i="."+t+"{";for(n in e)s=e[n],n in c&&(n=c[n],n.match(/^(webkit|moz|ms)/i)&&(n="-"+n)),i+=""+n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()+":"+s+";";return O+=i+"}"},d=function(t){return""+c.gradientProp+"("+t+", rgba(0, 0, 0, .5) 0%, rgba(255, 255, 255, .35) 100%)"},a=function(t){return t[0].toUpperCase()+t.slice(1)},l=function(t){var e;return e=document.createElement("div"),e.className=f[t],e},h=function(t,e,n){var i;return i=t.cloneNode(e),i.classList.add(f[n]),i},_=function(t){return t.style[c.transform]="translate3d(-99999px, 0, 0)"},T=function(t){return t.style[c.transform]="translate3d(0, 0, 0)"},b=function(t){return function(){var e,n,i,s,o,r;if(this._touchStarted)return t.apply(this,arguments);switch(e=arguments[0],n=arguments[1],i=arguments[2],r={},o=s=null,t.length){case 1:if(r.callback=e,!this.isFoldedUp)return"function"==typeof r.callback?r.callback():void 0;break;case 2:"function"==typeof e?r.callback=e:(s=e,r.callback=n);break;case 3:o=e,2===arguments.length?"object"==typeof n?r=n:"function"==typeof n?r.callback=n:s=n:3===arguments.length&&(s=n,"object"==typeof i?r=i:"function"==typeof i&&(r.callback=i))}return null==o&&(o=this._lastOp.angle||0),s||(s=this._lastOp.anchor),this._queue.push([t,this._normalizeAngle(o),this._getLonghandAnchor(s),r]),this._step(),this}},p=function(t){return setTimeout(t,0)},m=function(){},t=(null!=(S=window.jQuery||window.$)?S.data:void 0)?window.$:null,i=["left","right","top","bottom"],o=i.slice(0,2),s=i.slice(2),k=document.createElement("div"),O="",v=["Webkit","Moz","ms"],r="oridomi",f={active:"active",clone:"clone",holder:"holder",stage:"stage",stageLeft:"stage-left",stageRight:"stage-right",stageTop:"stage-top",stageBottom:"stage-bottom",content:"content",mask:"mask",maskH:"mask-h",maskV:"mask-v",panel:"panel",panelH:"panel-h",panelV:"panel-v",shader:"shader",shaderLeft:"shader-left",shaderRight:"shader-right",shaderTop:"shader-top",shaderBottom:"shader-bottom"};for(y in f)x=f[y],f[y]=""+r+"-"+x;c=new function(){var t,e,n,i;for(i=["transform","transformOrigin","transformStyle","transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction","perspective","perspectiveOrigin","backfaceVisibility","boxSizing","mask"],e=0,n=i.length;n>e;e++)t=i[e],this[t]=t;return this},function(){var t,e,s,o,r,h,l,u,p;for(e in c)if(r=c[e],c[e]=E(r),!c[e])return w(r);if(s="preserve-3d",k.style[c.transformStyle]=s,k.style[c.transformStyle]!==s)return w(s);c.gradientProp=function(){var t,e,n,i;for(n=0,i=v.length;i>n;n++)if(e=v[n],t="-"+e.toLowerCase()+"-linear-gradient",k.style.backgroundImage=""+t+"(left, #000, #fff)",-1!==k.style.backgroundImage.indexOf("gradient"))return t;return"linear-gradient"}(),u=function(){var t,e,n,i,s;for(i=0,s=v.length;s>i;i++)if(n=v[i],e="grab",k.style.cursor=t="-"+n.toLowerCase()+"-"+e,k.style.cursor===t)return[t,"-"+n.toLowerCase()+"-grabbing"];return k.style.cursor=e,k.style.cursor===e?[e,"grabbing"]:["move","move"]}(),c.grab=u[0],c.grabbing=u[1],c.transformProp=function(){var t;return(t=c.transform.match(/(\w+)Transform/i))?"-"+t[1].toLowerCase()+"-transform":"transform"}(),c.transitionEnd=function(){switch(c.transitionProperty.toLowerCase()){case"transitionproperty":return"transitionEnd";case"webkittransitionproperty":return"webkitTransitionEnd";case"moztransitionproperty":return"transitionend";case"mstransitionproperty":return"msTransitionEnd"}}(),n(f.active,{backgroundColor:"transparent !important",backgroundImage:"none !important",boxSizing:"border-box !important",border:"none !important",outline:"none !important",padding:"0 !important",position:"relative",transformStyle:s+" !important",mask:"none !important"}),n(f.clone,{margin:"0 !important",boxSizing:"border-box !important",overflow:"hidden !important",display:"block !important"}),n(f.holder,{width:"100%",position:"absolute",top:"0",bottom:"0",transformStyle:s}),n(f.stage,{width:"100%",height:"100%",position:"absolute",transform:"translate3d(-9999px, 0, 0)",margin:"0",padding:"0",transformStyle:s}),p={Left:"0% 50%",Right:"100% 50%",Top:"50% 0%",Bottom:"50% 100%"};for(y in p)x=p[y],n(f["stage"+y],{perspectiveOrigin:x});for(n(f.shader,{width:"100%",height:"100%",position:"absolute",opacity:"0",top:"0",left:"0",pointerEvents:"none",transitionProperty:"opacity"}),h=0,l=i.length;l>h;h++)t=i[h],n(f["shader"+a(t)],{background:d(t)});return n(f.content,{margin:"0 !important",position:"relative !important",float:"none !important",boxSizing:"border-box !important",overflow:"hidden !important"}),n(f.mask,{width:"100%",height:"100%",position:"absolute",overflow:"hidden",transform:"translate3d(0, 0, 0)"}),n(f.panel,{width:"100%",height:"100%",padding:"0",position:"relative",transitionProperty:c.transformProp,transformOrigin:"left",transformStyle:s}),n(f.panelH,{transformOrigin:"top"}),n(""+f.stageRight+" ."+f.panel,{transformOrigin:"right"}),n(""+f.stageBottom+" ."+f.panel,{transformOrigin:"bottom"}),o=document.createElement("style"),o.type="text/css",o.styleSheet?o.styleSheet.cssText=O:o.appendChild(document.createTextNode(O)),document.head.appendChild(o)}(),u={vPanels:3,hPanels:3,perspective:1e3,shading:"hard",speed:700,maxAngle:90,ripple:0,oriDomiClass:"oridomi",shadingIntensity:1,easingMethod:"",touchEnabled:!0,touchSensitivity:.25,touchStartCallback:m,touchMoveCallback:m,touchEndCallback:m},e=function(){function e(t,n){var r,p,d,m,v,b,O,w,k,E,S,A,P,M,z,D,F,H,R,U,N,q,I,V,j,B,$,Q,X,Y,Z,W,G,J,K,te,ee,ne,ie,se;if(this.el=t,null==n&&(n={}),this._onMouseOut=C(this._onMouseOut,this),this._onTouchLeave=C(this._onTouchLeave,this),this._onTouchEnd=C(this._onTouchEnd,this),this._onTouchMove=C(this._onTouchMove,this),this._onTouchStart=C(this._onTouchStart,this),this._stageReset=C(this._stageReset,this),this._conclude=C(this._conclude,this),this._onTransitionEnd=C(this._onTransitionEnd,this),this._step=C(this._step,this),g){if(!(this instanceof e))return function(t,e,n){n.prototype=t.prototype;var i=new n,s=t.apply(i,e);return Object(s)===s?s:i}(e,arguments,function(){});if("string"==typeof this.el&&(this.el=document.querySelector(this.el)),!this.el||1!==this.el.nodeType)return"undefined"!=typeof console&&null!==console&&console.warn("OriDomi: First argument must be a DOM element"),void 0;for(this._config=new function(){for(y in u)x=u[y],this[y]=null!=n[y]?n[y]:x;return this},this._config.ripple=Number(this._config.ripple),this._queue=[],this._panels={},this._stages={},this._lastOp={anchor:i[0]},this._shading=this._config.shading,this._shading===!0&&(this._shading="hard"),this._shading&&(this._shaders={},U={},R=l("shader"),R.style[c.transitionDuration]=this._config.speed+"ms",R.style[c.transitionTimingFunction]=this._config.easingMethod),q=l("stage"),q.style[c.perspective]=this._config.perspective+"px",I=0,$=i.length;$>I;I++)if(p=i[I],this._panels[p]=[],this._stages[p]=h(q,!1,"stage"+a(p)),this._shading){if(this._shaders[p]={},L.call(o,p)>=0)for(V=0,Q=o.length;Q>V;V++)N=o[V],this._shaders[p][N]=[];else for(j=0,X=s.length;X>j;j++)N=s[j],this._shaders[p][N]=[];U[p]=h(R,!1,"shader"+a(p))}for(O=h(this.el,!0,"content"),S=l("mask"),S.appendChild(O),D=l("panel"),D.style[c.transitionDuration]=this._config.speed+"ms",D.style[c.transitionTimingFunction]=this._config.easingMethod,se=["x","y"],B=0,Y=se.length;Y>B;B++){if(m=se[B],"x"===m?(d=o,w=this._config.vPanels,A="width",v="V"):(d=s,w=this._config.hPanels,A="height",v="H"),F=100/w,E=h(S,!0,"mask"+v),b=E.children[0],b.style.width=b.style.height="100%",b.style[A]=b.style["max"+a(A)]=100*w+"%",this._shading)for(K=0,Z=d.length;Z>K;K++)p=d[K],E.appendChild(U[p]);for(H=h(D,!1,"panel"+v),H.appendChild(E),P=te=0,W=d.length;W>te;P=++te){for(p=d[P],z=ee=0;w>=0?w>ee:ee>w;z=w>=0?++ee:--ee){if(M=H.cloneNode(!0),0===z&&(M.style[A]=F+"%"),b=M.children[0].children[0],0===P?(b.style[p]=100*-z+"%",M.style[p]=0===z?"0":"100%"):(b.style[d[0]]=-100*(w-z-1)+"%",M.style[c.origin]=p,M.style[d[0]]=0===z?100-F+"%":"-100%"),this._shading)for(k=ne=0,G=d.length;G>ne;k=++ne)r=d[k],this._shaders[p][r][z]=M.children[0].children[k+1];this._panels[p][z]=M,0!==z&&this._panels[p][z-1].appendChild(M)}this._stages[p].appendChild(this._panels[p][0])}}for(this._stageHolder=l("holder"),ie=0,J=i.length;J>ie;ie++)p=i[ie],this._stageHolder.appendChild(this._stages[p]);"absolute"===window.getComputedStyle(this.el).position&&(this.el.style.position="absolute"),this.el.classList.add(f.active),T(this._stages.left),this._cloneEl=h(this.el,!0,"clone"),this._cloneEl.classList.remove(f.active),_(this._cloneEl),this.el.innerHTML="",this.el.appendChild(this._cloneEl),this.el.appendChild(this._stageHolder),this.el.parentNode.style[c.transformStyle]="preserve-3d",this.accordion(0),this._config.ripple&&this.setRipple(this._config.ripple),this._config.touchEnabled&&this.enableTouch()}}return e.prototype._step=function(){var t,e,n,i,s,o,r=this;if(!this._inTrans&&this._queue.length)return this._inTrans=!0,o=this._queue.shift(),n=o[0],e=o[1],t=o[2],s=o[3],this.isFrozen&&this.unfreeze(),i=function(){var i;return r._setCallback({angle:e,anchor:t,options:s,fn:n}),i=[e,t,s],n.length<3&&i.shift(),n.apply(r,i)},this.isFoldedUp?2===n.length?i():this._unfold(i):t!==this._lastOp.anchor?this._stageReset(t,i):i()},e.prototype._isIdenticalOperation=function(t){var e,n,i,s,o;if(!this._lastOp.fn)return!0;if(this._lastOp.reset)return!1;for(s=["angle","anchor","fn"],n=0,i=s.length;i>n;n++)if(e=s[n],this._lastOp[e]!==t[e])return!1;o=t.options;for(y in o)if(x=o[y],x!==this._lastOp.options[y]&&"callback"!==y)return!1;return!0},e.prototype._setCallback=function(t){return this._isIdenticalOperation(t)?this._conclude(t.options.callback):this._panels[this._lastOp.anchor][0].addEventListener(c.transitionEnd,this._onTransitionEnd,!1),(this._lastOp=t).reset=!1},e.prototype._onTransitionEnd=function(t){return t.currentTarget.removeEventListener(c.transitionEnd,this._onTransitionEnd,!1),this._conclude(this._lastOp.options.callback,t)},e.prototype._conclude=function(t,e){var n=this;return p(function(){return n._inTrans=!1,n._step(),"function"==typeof t?t(e,n):void 0})},e.prototype._transformPanel=function(t,e,n,i){var s,o,r,a;switch(o=r=a=0,n){case"left":r=e,s="X(-1";break;case"right":r=-e,s="X(1";break;case"top":o=-e,s="Y(-1";break;case"bottom":o=e,s="Y(1"}return i&&(o=r=a=e),t.style[c.transform]="rotateX("+o+"deg)\nrotateY("+r+"deg)\nrotateZ("+a+"deg)\ntranslate"+s+"px)"},e.prototype._normalizeAngle=function(t){var e;return t=parseFloat(t,10),e=this._config.maxAngle,isNaN(t)?0:t>e?e:-e>t?-e:t},e.prototype._setTrans=function(t,e,n){var i=this;return null==n&&(n=this._lastOp.anchor),this._iterate(n,function(s,o,r){return i._setPanelTrans.apply(i,[n].concat(A.call(arguments),[t],[e]))})},e.prototype._setPanelTrans=function(t,e,n,i,r,a){var h,l,u,p,f,d,_=this;if(h=function(){switch(a){case 0:return 0;case 1:return _._config.speed/i*n;case 2:return _._config.speed/i*(i-n-1)}}(),e.style[c.transitionDuration]=r+"ms",e.style[c.transitionDelay]=h+"ms",this._shading)for(d=L.call(o,t)>=0?o:s,p=0,f=d.length;f>p;p++)u=d[p],l=this._shaders[t][u][n],l.style[c.transitionDuration]=r+"ms",l.style[c.transitionDelay]=h+"ms";return h},e.prototype._setShader=function(t,e,n){var i,s,r,a;return s=Math.abs(n),a=s/90*this._config.shadingIntensity,"hard"===this._shading?(a*=.15,n=this._lastOp.angle<0?s:-s):a*=.4,L.call(o,e)>=0?(0>n?(i=a,r=0):(i=0,r=a),this._shaders[e].left[t].style.opacity=i,this._shaders[e].right[t].style.opacity=r):(0>n?(i=0,r=a):(i=a,r=0),this._shaders[e].top[t].style.opacity=i,this._shaders[e].bottom[t].style.opacity=r)},e.prototype._showStage=function(t){var e=this;return t!==this._lastOp.anchor?(_(this._stages[this._lastOp.anchor]),this._lastOp.anchor=t,this._lastOp.reset=!0,this._stages[t].style[c.transform]="translate3d("+function(){switch(t){case"left":return"0, 0, 0)";case"right":return"-"+1*e._config.vPanels+"px, 0, 0)";case"top":return"0, 0, 0)";case"bottom":return"0, -"+1*(e._config.hPanels+2)+"px, 0)"}}()):void 0},e.prototype._stageReset=function(t,e){var n,i=this;return n=function(s){return s&&s.currentTarget.removeEventListener(c.transitionEnd,n,!1),i._showStage(t),p(e)},0===this._lastOp.angle?n():(this._panels[this._lastOp.anchor][0].addEventListener(c.transitionEnd,n,!1),this._iterate(this._lastOp.anchor,function(t,e){return i._transformPanel(t,0,i._lastOp.anchor),i._shading?i._setShader(e,i._lastOp.anchor,0):void 0}))},e.prototype._getLonghandAnchor=function(t){switch(t.toString()){case"left":case"l":case"4":return"left";case"right":case"r":case"2":return"right";case"top":case"t":case"1":return"top";case"bottom":case"b":case"3":return"bottom";default:return"left"}},e.prototype._setCursor=function(t){return null==t&&(t=this._touchEnabled),this.el.style.cursor=t?c.grab:"default"},e.prototype._setTouch=function(t){var e,n,i,s,o,r,a,h,l;if(t){if(this._touchEnabled)return this;s="addEventListener"}else{if(!this._touchEnabled)return this;s="removeEventListener"}this._touchEnabled=t,this._setCursor(),i=[["TouchStart","MouseDown"],["TouchEnd","MouseUp"],["TouchMove","MouseMove"],["TouchLeave","MouseLeave"]],o="onmouseleave"in window;for(r=0,h=i.length;h>r;r++)for(n=i[r],a=0,l=n.length;l>a;a++){if(e=n[a],"TouchLeave"===e&&!o){this.el[s]("mouseout",this._onMouseOut,!1);break}this.el[s](e.toLowerCase(),this["_on"+n[0]],!1)}return this},e.prototype._onTouchStart=function(t){var e,n;if(this._touchEnabled&&!this.isFoldedUp)return t.preventDefault(),this.emptyQueue(),this._touchStarted=!0,this.el.style.cursor=c.grabbing,this._setTrans(0,0),this._touchAxis=(n=this._lastOp.anchor,L.call(o,n)>=0?"x":"y"),this["_"+this._touchAxis+"Last"]=this._lastOp.angle,e="_"+this._touchAxis+"1",this[e]="mousedown"===t.type?t["page"+this._touchAxis.toUpperCase()]:t.targetTouches[0]["page"+this._touchAxis.toUpperCase()],this._config.touchStartCallback(this[e],t)},e.prototype._onTouchMove=function(t){var e,n,i;if(this._touchEnabled&&this._touchStarted)return t.preventDefault(),e="mousemove"===t.type?t["page"+this._touchAxis.toUpperCase()]:t.targetTouches[0]["page"+this._touchAxis.toUpperCase()],i=(e-this["_"+this._touchAxis+"1"])*this._config.touchSensitivity,this._lastOp.angle<0?(n="right"===this._lastOp.anchor||"bottom"===this._lastOp.anchor?this["_"+this._touchAxis+"Last"]-i:this["_"+this._touchAxis+"Last"]+i,n>0&&(n=0)):(n="right"===this._lastOp.anchor||"bottom"===this._lastOp.anchor?this["_"+this._touchAxis+"Last"]+i:this["_"+this._touchAxis+"Last"]-i,0>n&&(n=0)),this._lastOp.angle=n=this._normalizeAngle(n),this._lastOp.fn.call(this,n,this._lastOp.anchor,this._lastOp.options),this._config.touchMoveCallback(n,t)},e.prototype._onTouchEnd=function(t){return this._touchEnabled?(this._touchStarted=this._inTrans=!1,this.el.style.cursor=c.grab,this._setTrans(this._config.speed,this._config.ripple),this._config.touchEndCallback(this["_"+this._touchAxis+"Last"],t)):void 0},e.prototype._onTouchLeave=function(t){return this._touchEnabled&&this._touchStarted?this._onTouchEnd(t):void 0},e.prototype._onMouseOut=function(t){return this._touchEnabled&&this._touchStarted?t.toElement&&!this.el.contains(t.toElement)?this._onTouchEnd(t):void 0:void 0},e.prototype._unfold=function(t){var e,n=this;return this._inTrans=!0,e=this._lastOp.anchor,this._iterate(e,function(i,s,o){var r;return r=n._setPanelTrans.apply(n,[e].concat(A.call(arguments),[n._config.speed],[1])),function(e,i,s){return p(function(){return n._transformPanel(e,0,n._lastOp.anchor),setTimeout(function(){return T(e.children[0]),i===o-1&&(n._inTrans=n.isFoldedUp=!1,"function"==typeof t&&t(),n._lastOp.fn=n.accordion,n._lastOp.angle=0),p(function(){return e.style[c.transitionDuration]=n._config.speed})},s+.25*n._config.speed)})}(i,s,r)})},e.prototype._iterate=function(t,e){var n,i,s,o,r,a,h;for(a=s=this._panels[t],h=[],n=o=0,r=a.length;r>o;n=++o)i=a[n],h.push(e.call(this,i,n,s.length));return h},e.prototype.enableTouch=function(){return this._setTouch(!0)},e.prototype.disableTouch=function(){return this._setTouch(!1)},e.prototype.setSpeed=function(t){var e,n,s;for(n=0,s=i.length;s>n;n++)e=i[n],this._setTrans(this._config.speed=t,this._config.ripple,e);return this},e.prototype.freeze=function(t){var e=this;return this.isFrozen?"function"==typeof t&&t():this._stageReset(this._lastOp.anchor,function(){return e.isFrozen=!0,_(e._stageHolder),T(e._cloneEl),e._setCursor(!1),"function"==typeof t?t():void 0}),this},e.prototype.unfreeze=function(){return this.isFrozen&&(this.isFrozen=!1,_(this._cloneEl),T(this._stageHolder),this._setCursor(),this._lastOp.angle=0),this},e.prototype.destroy=function(e){var n=this;return this.freeze(function(){return n._setTouch(!1),t&&t.data(n.el,r,null),n.el.innerHTML=n._cloneEl.innerHTML,n.el.classList.remove(f.active),"function"==typeof e?e():void 0}),null},e.prototype.emptyQueue=function(){var t=this;return this._queue=[],p(function(){return t._inTrans=!1}),this},e.prototype.setRipple=function(t){return null==t&&(t=1),this._config.ripple=Number(t),this.setSpeed(this._config.speed),this},e.prototype.constrainAngle=function(t){return this._config.maxAngle=parseFloat(t,10)||u.maxAngle,this},e.prototype.wait=function(t){var e,n=this;return e=function(){return setTimeout(n._conclude,t)},this._inTrans?this._queue.push([e,this._lastOp.angle,this._lastOp.anchor,this._lastOp.options]):e(),this},e.prototype.modifyContent=function(t){var e,n,s,o,r,a,h,l,c,u;for("function"!=typeof t&&(o=t,r=function(t,e,n){var i,s;if(e&&(t.innerHTML=e),n){for(i in n)s=n[i],t.style[i]=s;return null}},t=function(t){var e,n,i,s,a,h,l,c;for(i in o)if(a=o[i],e=s=null,"string"==typeof a?e=a:(e=a.content,s=a.style),""!==i)for(c=t.querySelectorAll(i),h=0,l=c.length;l>h;h++)n=c[h],r(n,e,s);else r(t,e,s);return null}),a=0,l=i.length;l>a;a++)for(e=i[a],u=this._panels[e],n=h=0,c=u.length;c>h;n=++h)s=u[n],t(s.children[0].children[0],n,e);return this},e.prototype.accordion=b(function(t,e,n){var i=this;return this._iterate(e,function(s,o){var r;return r=0===o%2||n.twist?t:-t,n.sticky?0===o?r=0:(o>1||n.stairs)&&(r*=2):0!==o&&(r*=2),n.stairs&&(r*=-1),i._transformPanel(s,r,e,n.fracture),!i._shading||0===o&&n.sticky||180===Math.abs(r)?void 0:i._setShader(o,e,r)})}),e.prototype.curl=b(function(t,e,n){var i=this;return t/=L.call(o,e)>=0?this._config.vPanels:this._config.hPanels,this._iterate(e,function(n,s){return i._transformPanel(n,t,e),i._shading?i._setShader(s,e,0):void 0})}),e.prototype.ramp=b(function(t,e,n){var i=this;return this._transformPanel(this._panels[e][1],t,e),this._iterate(e,function(t,n){return 1!==n&&i._transformPanel(t,0,e),i._shading?i._setShader(n,e,0):void 0})}),e.prototype.foldUp=b(function(t,e){var n=this;return this.isFoldedUp?"function"==typeof e?e():void 0:this._stageReset(t,function(){return n._inTrans=n.isFoldedUp=!0,n._iterate(t,function(i,s,o){var r,a;return a=n._config.speed,0===s&&(a/=2),r=n._setPanelTrans.apply(n,[t].concat(A.call(arguments),[a],[2])),function(i,s,o){return p(function(){return n._transformPanel(i,0===s?90:170,t),setTimeout(function(){return 0===s?(n._inTrans=!1,"function"==typeof e?e():void 0):_(i.children[0])},o+.25*n._config.speed)})}(i,s,r)})})}),e.prototype.unfold=b(function(t){return this._unfold.apply(this,arguments)}),e.prototype.map=function(t){var e=this;return b(function(n,i,s){return e._iterate(i,function(o,r,a){return e._transformPanel(o,t(n,r,a),i,s.fracture)})}).bind(this)},e.prototype.reset=function(t){return this.accordion(0,{callback:t})},e.prototype.reveal=function(t,e,n){return null==n&&(n={}),n.sticky=!0,this.accordion(t,e,n)},e.prototype.stairs=function(t,e,n){return null==n&&(n={}),n.stairs=n.sticky=!0,this.accordion(t,e,n)},e.prototype.fracture=function(t,e,n){return null==n&&(n={}),n.fracture=!0,this.accordion(t,e,n)},e.prototype.twist=function(t,e,n){return null==n&&(n={}),n.fracture=n.twist=!0,this.accordion(t/10,e,n)},e.prototype.collapse=function(t,e){return null==e&&(e={}),e.sticky=!1,this.accordion(-this._config.maxAngle,t,e)},e.prototype.collapseAlt=function(t,e){return null==e&&(e={}),e.sticky=!1,this.accordion(this._config.maxAngle,t,e)},e.VERSION="1.0.2",e.isSupported=g,e}(),("undefined"!=typeof module&&null!==module?module.exports:void 0)?module.exports=e:("undefined"!=typeof define&&null!==define?define.amd:void 0)?define(function(){return e}):window.OriDomi=e,t&&(t.prototype.oriDomi=function(n){var i,s,o,a,h,l,c,u;if(!g)return this;if(n===!0)return t.data(this[0],r);if("string"==typeof n){if(a=n,"function"!=typeof(o=e.prototype[a]))return"undefined"!=typeof console&&null!==console&&console.warn("OriDomi: No such method `"+a+"`"),this;for(h=0,c=this.length;c>h;h++)i=this[h],(s=t.data(i,r))||(s=t.data(i,r,new e(i,n))),o.apply(s,Array.prototype.slice.call(arguments).slice(1))}else for(l=0,u=this.length;u>l;l++)i=this[l],(s=t.data(i,r))||t.data(i,r,new e(i,n));return this})}).call(this);
|
@@ -0,0 +1 @@
|
|
1
|
+
require "oridomi/rails"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/oridomi/rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Sean Williamson"]
|
6
|
+
gem.email = ["supernullset@wpw.so"]
|
7
|
+
gem.description = %q{OriDomi, bundled for the Rails 3.0 and up}
|
8
|
+
gem.summary = %q{OriDomi, bundled for the Rails 3.0 and up}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "oridomi-rails"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = OriDomi::Rails::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency "railties", ">= 3.0.0"
|
19
|
+
gem.add_development_dependency "bundler", ">= 1.1.0"
|
20
|
+
gem.add_development_dependency "rake", "~> 0.9.2.2"
|
21
|
+
|
22
|
+
gem.add_development_dependency "rails", "~> 4.0.1"
|
23
|
+
gem.add_development_dependency "minitest-rails-capybara", "~> 0.10.0"
|
24
|
+
gem.add_development_dependency "sqlite3", "~> 1.3.8"
|
25
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require oridomi-development
|
14
|
+
//= require oridomi
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
6
|
+
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/test/dummy/bin/rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
|
7
|
+
module Dummy
|
8
|
+
class Application < Rails::Application
|
9
|
+
# Settings in config/environments/* take precedence over those specified here.
|
10
|
+
# Application configuration should go into files in config/initializers
|
11
|
+
# -- all .rb files in that directory are automatically loaded.
|
12
|
+
|
13
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
14
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
15
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
16
|
+
|
17
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
18
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
19
|
+
# config.i18n.default_locale = :de
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Warning: The database defined as "test" will be erased and
|
2
|
+
# re-generated from your development database when you run "rake".
|
3
|
+
# Do not set this db to the same as development or production.
|
4
|
+
test:
|
5
|
+
adapter: sqlite3
|
6
|
+
database: db/test.sqlite3
|
7
|
+
pool: 5
|
8
|
+
timeout: 5000
|
@@ -0,0 +1,29 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both thread web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
20
|
+
# config.action_dispatch.rack_cache = true
|
21
|
+
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
23
|
+
config.serve_static_assets = false
|
24
|
+
|
25
|
+
# Compress JavaScripts and CSS.
|
26
|
+
config.assets.js_compressor = :uglifier
|
27
|
+
# config.assets.css_compressor = :sass
|
28
|
+
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
30
|
+
config.assets.compile = false
|
31
|
+
|
32
|
+
# Generate digests for assets URLs.
|
33
|
+
config.assets.digest = true
|
34
|
+
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
36
|
+
config.assets.version = '1.0'
|
37
|
+
|
38
|
+
# Specifies the header that your server uses for sending files.
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
41
|
+
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
43
|
+
# config.force_ssl = true
|
44
|
+
|
45
|
+
# Set to :debug to see everything in the log.
|
46
|
+
config.log_level = :info
|
47
|
+
|
48
|
+
# Prepend all log lines with the following tags.
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
50
|
+
|
51
|
+
# Use a different logger for distributed setups.
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
53
|
+
|
54
|
+
# Use a different cache store in production.
|
55
|
+
# config.cache_store = :mem_cache_store
|
56
|
+
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
58
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
59
|
+
|
60
|
+
# Precompile additional assets.
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
62
|
+
# config.assets.precompile += %w( search.js )
|
63
|
+
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
66
|
+
# config.action_mailer.raise_delivery_errors = false
|
67
|
+
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
70
|
+
config.i18n.fallbacks = true
|
71
|
+
|
72
|
+
# Send deprecation notices to registered listeners.
|
73
|
+
config.active_support.deprecation = :notify
|
74
|
+
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
76
|
+
# config.autoflush_log = false
|
77
|
+
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
80
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_assets = true
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Print deprecation notices to the stderr.
|
35
|
+
config.active_support.deprecation = :stderr
|
36
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
Dummy::Application.config.secret_key_base = '7b06fe63d074c1fca22e87c61c28d6bfa145acb432824ca398446ef5485965f7c7c039a3a61a82bcbf12b63789896e4d9307f4a2194a562a0b72a084a325fd05'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|