materialize-sass 0.97.0 → 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitattributes +1 -0
- data/.gitignore +3 -0
- data/README.md +48 -10
- data/Rakefile +129 -1
- data/assets/javascripts/materialize/anime.min.js +417 -0
- data/assets/javascripts/materialize/autocomplete.js +504 -0
- data/assets/javascripts/materialize/buttons.js +409 -0
- data/assets/javascripts/materialize/cards.js +34 -0
- data/assets/javascripts/materialize/carousel.js +797 -0
- data/assets/javascripts/materialize/cash.js +990 -0
- data/assets/javascripts/materialize/characterCounter.js +180 -0
- data/assets/javascripts/materialize/chips.js +564 -0
- data/assets/javascripts/materialize/collapsible.js +337 -0
- data/assets/javascripts/materialize/component.js +57 -0
- data/assets/javascripts/materialize/datepicker.js +935 -0
- data/assets/javascripts/materialize/dropdown.js +659 -0
- data/assets/javascripts/materialize/extras/nouislider.js +2147 -0
- data/assets/javascripts/materialize/extras/nouislider.min.js +1 -0
- data/assets/javascripts/materialize/forms.js +244 -0
- data/assets/javascripts/materialize/global.js +408 -0
- data/assets/javascripts/materialize/materialbox.js +513 -0
- data/assets/javascripts/materialize/modal.js +449 -0
- data/assets/javascripts/materialize/parallax.js +173 -0
- data/assets/javascripts/materialize/pushpin.js +179 -0
- data/assets/javascripts/materialize/range.js +310 -0
- data/assets/javascripts/materialize/scrollspy.js +328 -0
- data/assets/javascripts/materialize/select.js +497 -0
- data/assets/javascripts/materialize/sidenav.js +655 -0
- data/assets/javascripts/materialize/slider.js +424 -0
- data/assets/javascripts/materialize/tabs.js +476 -0
- data/assets/javascripts/materialize/tapTarget.js +364 -0
- data/assets/javascripts/materialize/timepicker.js +647 -0
- data/assets/javascripts/materialize/toasts.js +355 -0
- data/assets/javascripts/materialize/tooltip.js +351 -0
- data/{app/assets → assets}/javascripts/materialize/waves.js +42 -47
- data/assets/javascripts/materialize-sprockets.js +29 -0
- data/assets/javascripts/materialize.js +12374 -0
- data/assets/stylesheets/materialize/components/_badges.scss +55 -0
- data/assets/stylesheets/materialize/components/_buttons.scss +322 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_cards.scss +72 -29
- data/assets/stylesheets/materialize/components/_carousel.scss +90 -0
- data/assets/stylesheets/materialize/components/_chips.scss +90 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_collapsible.scss +23 -17
- data/assets/stylesheets/materialize/components/_color-classes.scss +32 -0
- data/{app/assets/stylesheets/materialize/components/_color.scss → assets/stylesheets/materialize/components/_color-variables.scss} +22 -64
- data/assets/stylesheets/materialize/components/_datepicker.scss +191 -0
- data/assets/stylesheets/materialize/components/_dropdown.scss +85 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_global.scss +197 -144
- data/{app/assets → assets}/stylesheets/materialize/components/_grid.scss +57 -18
- data/assets/stylesheets/materialize/components/_icons-material-design.scss +5 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_materialbox.scss +15 -13
- data/{app/assets → assets}/stylesheets/materialize/components/_modal.scss +18 -14
- data/{app/assets → assets}/stylesheets/materialize/components/_navbar.scss +89 -25
- data/assets/stylesheets/materialize/components/_normalize.scss +447 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_preloader.scss +5 -3
- data/assets/stylesheets/materialize/components/_pulse.scss +34 -0
- data/assets/stylesheets/materialize/components/_sidenav.scss +208 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_slider.scss +2 -2
- data/{app/assets → assets}/stylesheets/materialize/components/_table_of_contents.scss +5 -5
- data/assets/stylesheets/materialize/components/_tabs.scss +99 -0
- data/assets/stylesheets/materialize/components/_tapTarget.scss +103 -0
- data/assets/stylesheets/materialize/components/_timepicker.scss +183 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_toast.scss +17 -22
- data/assets/stylesheets/materialize/components/_tooltip.scss +32 -0
- data/assets/stylesheets/materialize/components/_transitions.scss +13 -0
- data/{app/assets → assets}/stylesheets/materialize/components/_typography.scss +11 -9
- data/assets/stylesheets/materialize/components/_variables.scss +349 -0
- data/assets/stylesheets/materialize/components/_waves.scss +114 -0
- data/assets/stylesheets/materialize/components/forms/_checkboxes.scss +200 -0
- data/assets/stylesheets/materialize/components/forms/_file-input.scss +44 -0
- data/assets/stylesheets/materialize/components/forms/_forms.scss +22 -0
- data/assets/stylesheets/materialize/components/forms/_input-fields.scss +354 -0
- data/assets/stylesheets/materialize/components/forms/_radio-buttons.scss +115 -0
- data/assets/stylesheets/materialize/components/forms/_range.scss +161 -0
- data/assets/stylesheets/materialize/components/forms/_select.scss +190 -0
- data/assets/stylesheets/materialize/components/forms/_switches.scss +89 -0
- data/assets/stylesheets/materialize/extras/nouislider.css +406 -0
- data/{app/assets → assets}/stylesheets/materialize.scss +13 -10
- data/lib/materialize-sass/engine.rb +11 -6
- data/lib/materialize-sass/helpers.rb +38 -0
- data/lib/materialize-sass/version.rb +1 -1
- data/lib/materialize-sass.rb +13 -28
- data/materialize-sass.gemspec +5 -5
- metadata +97 -105
- data/app/assets/fonts/material-design-icons/LICENSE.txt +0 -428
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.eot +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.svg +0 -769
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.ttf +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff +0 -0
- data/app/assets/fonts/material-design-icons/Material-Design-Icons.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/app/assets/javascripts/materialize/animation.js +0 -9
- data/app/assets/javascripts/materialize/buttons.js +0 -61
- data/app/assets/javascripts/materialize/cards.js +0 -27
- data/app/assets/javascripts/materialize/character_counter.js +0 -59
- data/app/assets/javascripts/materialize/collapsible.js +0 -139
- data/app/assets/javascripts/materialize/date_picker/picker.date.js +0 -1430
- data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1123
- data/app/assets/javascripts/materialize/dropdown.js +0 -178
- data/app/assets/javascripts/materialize/forms.js +0 -456
- data/app/assets/javascripts/materialize/global.js +0 -36
- data/app/assets/javascripts/materialize/hammer.min.js +0 -1
- data/app/assets/javascripts/materialize/init.js +0 -136
- data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
- data/app/assets/javascripts/materialize/jquery.hammer.js +0 -33
- data/app/assets/javascripts/materialize/jquery.timeago.min.js +0 -1
- data/app/assets/javascripts/materialize/leanModal.js +0 -178
- data/app/assets/javascripts/materialize/materialbox.js +0 -249
- data/app/assets/javascripts/materialize/parallax.js +0 -58
- data/app/assets/javascripts/materialize/prism.js +0 -8
- data/app/assets/javascripts/materialize/pushpin.js +0 -62
- data/app/assets/javascripts/materialize/scrollFire.js +0 -44
- data/app/assets/javascripts/materialize/scrollspy.js +0 -284
- data/app/assets/javascripts/materialize/sideNav.js +0 -312
- data/app/assets/javascripts/materialize/slider.js +0 -301
- data/app/assets/javascripts/materialize/tabs.js +0 -136
- data/app/assets/javascripts/materialize/toasts.js +0 -125
- data/app/assets/javascripts/materialize/tooltip.js +0 -166
- data/app/assets/javascripts/materialize/transitions.js +0 -154
- data/app/assets/javascripts/materialize/velocity.min.js +0 -4
- data/app/assets/javascripts/materialize-sprockets.js +0 -27
- data/app/assets/javascripts/materialize.js +0 -6159
- data/app/assets/stylesheets/materialize/components/_buttons.scss +0 -157
- data/app/assets/stylesheets/materialize/components/_dropdown.scss +0 -40
- data/app/assets/stylesheets/materialize/components/_form.scss +0 -886
- data/app/assets/stylesheets/materialize/components/_icons-material-design.scss +0 -3257
- data/app/assets/stylesheets/materialize/components/_mixins.scss +0 -5
- data/app/assets/stylesheets/materialize/components/_normalize.scss +0 -427
- data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -376
- data/app/assets/stylesheets/materialize/components/_roboto.scss +0 -38
- data/app/assets/stylesheets/materialize/components/_sideNav.scss +0 -111
- data/app/assets/stylesheets/materialize/components/_tabs.scss +0 -47
- data/app/assets/stylesheets/materialize/components/_tooltip.scss +0 -34
- data/app/assets/stylesheets/materialize/components/_variables.scss +0 -152
- data/app/assets/stylesheets/materialize/components/_waves.scss +0 -167
- data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +0 -435
- data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +0 -201
- data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +0 -125
@@ -1 +0,0 @@
|
|
1
|
-
!function(a,b,c,d){"use strict";function k(a,b,c){return setTimeout(q(a,c),b)}function l(a,b,c){return Array.isArray(a)?(m(a,c[b],c),!0):!1}function m(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e<a.length;)b.call(c,a[e],e,a),e++;else for(e in a)a.hasOwnProperty(e)&&b.call(c,a[e],e,a)}function n(a,b,c){for(var e=Object.keys(b),f=0;f<e.length;)(!c||c&&a[e[f]]===d)&&(a[e[f]]=b[e[f]]),f++;return a}function o(a,b){return n(a,b,!0)}function p(a,b,c){var e,d=b.prototype;e=a.prototype=Object.create(d),e.constructor=a,e._super=d,c&&n(e,c)}function q(a,b){return function(){return a.apply(b,arguments)}}function r(a,b){return typeof a==g?a.apply(b?b[0]||d:d,b):a}function s(a,b){return a===d?b:a}function t(a,b,c){m(x(b),function(b){a.addEventListener(b,c,!1)})}function u(a,b,c){m(x(b),function(b){a.removeEventListener(b,c,!1)})}function v(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function w(a,b){return a.indexOf(b)>-1}function x(a){return a.trim().split(/\s+/g)}function y(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function z(a){return Array.prototype.slice.call(a,0)}function A(a,b,c){for(var d=[],e=[],f=0;f<a.length;){var g=b?a[f][b]:a[f];y(e,g)<0&&d.push(a[f]),e[f]=g,f++}return c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort()),d}function B(a,b){for(var c,f,g=b[0].toUpperCase()+b.slice(1),h=0;h<e.length;){if(c=e[h],f=c?c+g:b,f in a)return f;h++}return d}function D(){return C++}function E(a){var b=a.ownerDocument;return b.defaultView||b.parentWindow}function ab(a,b){var c=this;this.manager=a,this.callback=b,this.element=a.element,this.target=a.options.inputTarget,this.domHandler=function(b){r(a.options.enable,[a])&&c.handler(b)},this.init()}function bb(a){var b,c=a.options.inputClass;return b=c?c:H?wb:I?Eb:G?Gb:rb,new b(a,cb)}function cb(a,b,c){var d=c.pointers.length,e=c.changedPointers.length,f=b&O&&0===d-e,g=b&(Q|R)&&0===d-e;c.isFirst=!!f,c.isFinal=!!g,f&&(a.session={}),c.eventType=b,db(a,c),a.emit("hammer.input",c),a.recognize(c),a.session.prevInput=c}function db(a,b){var c=a.session,d=b.pointers,e=d.length;c.firstInput||(c.firstInput=gb(b)),e>1&&!c.firstMultiple?c.firstMultiple=gb(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=hb(d);b.timeStamp=j(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=lb(h,i),b.distance=kb(h,i),eb(c,b),b.offsetDirection=jb(b.deltaX,b.deltaY),b.scale=g?nb(g.pointers,d):1,b.rotation=g?mb(g.pointers,d):0,fb(c,b);var k=a.element;v(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function eb(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===O||f.eventType===Q)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function fb(a,b){var f,g,h,j,c=a.lastInterval||b,e=b.timeStamp-c.timeStamp;if(b.eventType!=R&&(e>N||c.velocity===d)){var k=c.deltaX-b.deltaX,l=c.deltaY-b.deltaY,m=ib(e,k,l);g=m.x,h=m.y,f=i(m.x)>i(m.y)?m.x:m.y,j=jb(k,l),a.lastInterval=b}else f=c.velocity,g=c.velocityX,h=c.velocityY,j=c.direction;b.velocity=f,b.velocityX=g,b.velocityY=h,b.direction=j}function gb(a){for(var b=[],c=0;c<a.pointers.length;)b[c]={clientX:h(a.pointers[c].clientX),clientY:h(a.pointers[c].clientY)},c++;return{timeStamp:j(),pointers:b,center:hb(b),deltaX:a.deltaX,deltaY:a.deltaY}}function hb(a){var b=a.length;if(1===b)return{x:h(a[0].clientX),y:h(a[0].clientY)};for(var c=0,d=0,e=0;b>e;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:h(c/b),y:h(d/b)}}function ib(a,b,c){return{x:b/a||0,y:c/a||0}}function jb(a,b){return a===b?S:i(a)>=i(b)?a>0?T:U:b>0?V:W}function kb(a,b,c){c||(c=$);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function lb(a,b,c){c||(c=$);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function mb(a,b){return lb(b[1],b[0],_)-lb(a[1],a[0],_)}function nb(a,b){return kb(b[0],b[1],_)/kb(a[0],a[1],_)}function rb(){this.evEl=pb,this.evWin=qb,this.allow=!0,this.pressed=!1,ab.apply(this,arguments)}function wb(){this.evEl=ub,this.evWin=vb,ab.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Ab(){this.evTarget=yb,this.evWin=zb,this.started=!1,ab.apply(this,arguments)}function Bb(a,b){var c=z(a.touches),d=z(a.changedTouches);return b&(Q|R)&&(c=A(c.concat(d),"identifier",!0)),[c,d]}function Eb(){this.evTarget=Db,this.targetIds={},ab.apply(this,arguments)}function Fb(a,b){var c=z(a.touches),d=this.targetIds;if(b&(O|P)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=z(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return v(a.target,i)}),b===O)for(e=0;e<f.length;)d[f[e].identifier]=!0,e++;for(e=0;e<g.length;)d[g[e].identifier]&&h.push(g[e]),b&(Q|R)&&delete d[g[e].identifier],e++;return h.length?[A(f.concat(h),"identifier",!0),h]:void 0}function Gb(){ab.apply(this,arguments);var a=q(this.handler,this);this.touch=new Eb(this.manager,a),this.mouse=new rb(this.manager,a)}function Pb(a,b){this.manager=a,this.set(b)}function Qb(a){if(w(a,Mb))return Mb;var b=w(a,Nb),c=w(a,Ob);return b&&c?Nb+" "+Ob:b||c?b?Nb:Ob:w(a,Lb)?Lb:Kb}function Yb(a){this.id=D(),this.manager=null,this.options=o(a||{},this.defaults),this.options.enable=s(this.options.enable,!0),this.state=Rb,this.simultaneous={},this.requireFail=[]}function Zb(a){return a&Wb?"cancel":a&Ub?"end":a&Tb?"move":a&Sb?"start":""}function $b(a){return a==W?"down":a==V?"up":a==T?"left":a==U?"right":""}function _b(a,b){var c=b.manager;return c?c.get(a):a}function ac(){Yb.apply(this,arguments)}function bc(){ac.apply(this,arguments),this.pX=null,this.pY=null}function cc(){ac.apply(this,arguments)}function dc(){Yb.apply(this,arguments),this._timer=null,this._input=null}function ec(){ac.apply(this,arguments)}function fc(){ac.apply(this,arguments)}function gc(){Yb.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function hc(a,b){return b=b||{},b.recognizers=s(b.recognizers,hc.defaults.preset),new kc(a,b)}function kc(a,b){b=b||{},this.options=o(b,hc.defaults),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.element=a,this.input=bb(this),this.touchAction=new Pb(this,this.options.touchAction),lc(this,!0),m(b.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function lc(a,b){var c=a.element;m(a.options.cssProps,function(a,d){c.style[B(c.style,d)]=b?a:""})}function mc(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var e=["","webkit","moz","MS","ms","o"],f=b.createElement("div"),g="function",h=Math.round,i=Math.abs,j=Date.now,C=1,F=/mobile|tablet|ip(ad|hone|od)|android/i,G="ontouchstart"in a,H=B(a,"PointerEvent")!==d,I=G&&F.test(navigator.userAgent),J="touch",K="pen",L="mouse",M="kinect",N=25,O=1,P=2,Q=4,R=8,S=1,T=2,U=4,V=8,W=16,X=T|U,Y=V|W,Z=X|Y,$=["x","y"],_=["clientX","clientY"];ab.prototype={handler:function(){},init:function(){this.evEl&&t(this.element,this.evEl,this.domHandler),this.evTarget&&t(this.target,this.evTarget,this.domHandler),this.evWin&&t(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&u(this.element,this.evEl,this.domHandler),this.evTarget&&u(this.target,this.evTarget,this.domHandler),this.evWin&&u(E(this.element),this.evWin,this.domHandler)}};var ob={mousedown:O,mousemove:P,mouseup:Q},pb="mousedown",qb="mousemove mouseup";p(rb,ab,{handler:function(a){var b=ob[a.type];b&O&&0===a.button&&(this.pressed=!0),b&P&&1!==a.which&&(b=Q),this.pressed&&this.allow&&(b&Q&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:L,srcEvent:a}))}});var sb={pointerdown:O,pointermove:P,pointerup:Q,pointercancel:R,pointerout:R},tb={2:J,3:K,4:L,5:M},ub="pointerdown",vb="pointermove pointerup pointercancel";a.MSPointerEvent&&(ub="MSPointerDown",vb="MSPointerMove MSPointerUp MSPointerCancel"),p(wb,ab,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),e=sb[d],f=tb[a.pointerType]||a.pointerType,g=f==J,h=y(b,a.pointerId,"pointerId");e&O&&(0===a.button||g)?0>h&&(b.push(a),h=b.length-1):e&(Q|R)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var xb={touchstart:O,touchmove:P,touchend:Q,touchcancel:R},yb="touchstart",zb="touchstart touchmove touchend touchcancel";p(Ab,ab,{handler:function(a){var b=xb[a.type];if(b===O&&(this.started=!0),this.started){var c=Bb.call(this,a,b);b&(Q|R)&&0===c[0].length-c[1].length&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:J,srcEvent:a})}}});var Cb={touchstart:O,touchmove:P,touchend:Q,touchcancel:R},Db="touchstart touchmove touchend touchcancel";p(Eb,ab,{handler:function(a){var b=Cb[a.type],c=Fb.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:J,srcEvent:a})}}),p(Gb,ab,{handler:function(a,b,c){var d=c.pointerType==J,e=c.pointerType==L;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Q|R)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Hb=B(f.style,"touchAction"),Ib=Hb!==d,Jb="compute",Kb="auto",Lb="manipulation",Mb="none",Nb="pan-x",Ob="pan-y";Pb.prototype={set:function(a){a==Jb&&(a=this.compute()),Ib&&(this.manager.element.style[Hb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return m(this.manager.recognizers,function(b){r(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),Qb(a.join(" "))},preventDefaults:function(a){if(!Ib){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return b.preventDefault(),void 0;var d=this.actions,e=w(d,Mb),f=w(d,Ob),g=w(d,Nb);return e||f&&c&X||g&&c&Y?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var Rb=1,Sb=2,Tb=4,Ub=8,Vb=Ub,Wb=16,Xb=32;Yb.prototype={defaults:{},set:function(a){return n(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(l(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_b(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return l(a,"dropRecognizeWith",this)?this:(a=_b(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(l(a,"requireFailure",this))return this;var b=this.requireFail;return a=_b(a,this),-1===y(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(l(a,"dropRequireFailure",this))return this;a=_b(a,this);var b=y(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function d(d){b.manager.emit(b.options.event+(d?Zb(c):""),a)}var b=this,c=this.state;Ub>c&&d(!0),d(),c>=Ub&&d(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):(this.state=Xb,void 0)},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&(Xb|Rb)))return!1;a++}return!0},recognize:function(a){var b=n({},a);return r(this.options.enable,[this,b])?(this.state&(Vb|Wb|Xb)&&(this.state=Rb),this.state=this.process(b),this.state&(Sb|Tb|Ub|Wb)&&this.tryEmit(b),void 0):(this.reset(),this.state=Xb,void 0)},process:function(){},getTouchAction:function(){},reset:function(){}},p(ac,Yb,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=this.state,c=a.eventType,d=b&(Sb|Tb),e=this.attrTest(a);return d&&(c&R||!e)?b|Wb:d||e?c&Q?b|Ub:b&Sb?b|Tb:Sb:Xb}}),p(bc,ac,{defaults:{event:"pan",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var a=this.options.direction,b=[];return a&X&&b.push(Ob),a&Y&&b.push(Nb),b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,e=a.direction,f=a.deltaX,g=a.deltaY;return e&b.direction||(b.direction&X?(e=0===f?S:0>f?T:U,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?S:0>g?V:W,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return ac.prototype.attrTest.call(this,a)&&(this.state&Sb||!(this.state&Sb)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$b(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),p(cc,ac,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Mb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&Sb)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),p(dc,Yb,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[Kb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime>b.time;if(this._input=a,!d||!c||a.eventType&(Q|R)&&!e)this.reset();else if(a.eventType&O)this.reset(),this._timer=k(function(){this.state=Vb,this.tryEmit()},b.time,this);else if(a.eventType&Q)return Vb;return Xb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===Vb&&(a&&a.eventType&Q?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=j(),this.manager.emit(this.options.event,this._input)))}}),p(ec,ac,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Mb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&Sb)}}),p(fc,ac,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:X|Y,pointers:1},getTouchAction:function(){return bc.prototype.getTouchAction.call(this)},attrTest:function(a){var c,b=this.options.direction;return b&(X|Y)?c=a.velocity:b&X?c=a.velocityX:b&Y&&(c=a.velocityY),this._super.attrTest.call(this,a)&&b&a.direction&&a.distance>this.options.threshold&&i(c)>this.options.velocity&&a.eventType&Q},emit:function(a){var b=$b(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),p(gc,Yb,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[Lb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,e=a.deltaTime<b.time;if(this.reset(),a.eventType&O&&0===this.count)return this.failTimeout();if(d&&e&&c){if(a.eventType!=Q)return this.failTimeout();var f=this.pTime?a.timeStamp-this.pTime<b.interval:!0,g=!this.pCenter||kb(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp,this.pCenter=a.center,g&&f?this.count+=1:this.count=1,this._input=a;var h=this.count%b.taps;if(0===h)return this.hasRequireFailures()?(this._timer=k(function(){this.state=Vb,this.tryEmit()},b.interval,this),Sb):Vb}return Xb},failTimeout:function(){return this._timer=k(function(){this.state=Xb},this.options.interval,this),Xb},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Vb&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),hc.VERSION="2.0.4",hc.defaults={domEvents:!1,touchAction:Jb,enable:!0,inputTarget:null,inputClass:null,preset:[[ec,{enable:!1}],[cc,{enable:!1},["rotate"]],[fc,{direction:X}],[bc,{direction:X},["swipe"]],[gc],[gc,{event:"doubletap",taps:2},["tap"]],[dc]],cssProps:{userSelect:"default",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var ic=1,jc=2;kc.prototype={set:function(a){return n(this.options,a),a.touchAction&&this.touchAction.update(),a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init()),this},stop:function(a){this.session.stopped=a?jc:ic},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,e=b.curRecognizer;(!e||e&&e.state&Vb)&&(e=b.curRecognizer=null);for(var f=0;f<d.length;)c=d[f],b.stopped===jc||e&&c!=e&&!c.canRecognizeWith(e)?c.reset():c.recognize(a),!e&&c.state&(Sb|Tb|Ub)&&(e=b.curRecognizer=c),f++}},get:function(a){if(a instanceof Yb)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(l(a,"add",this))return this;var b=this.get(a.options.event);return b&&this.remove(b),this.recognizers.push(a),a.manager=this,this.touchAction.update(),a},remove:function(a){if(l(a,"remove",this))return this;var b=this.recognizers;return a=this.get(a),b.splice(y(b,a),1),this.touchAction.update(),this},on:function(a,b){var c=this.handlers;return m(x(a),function(a){c[a]=c[a]||[],c[a].push(b)}),this},off:function(a,b){var c=this.handlers;return m(x(a),function(a){b?c[a].splice(y(c[a],b),1):delete c[a]}),this},emit:function(a,b){this.options.domEvents&&mc(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a,b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&lc(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},n(hc,{INPUT_START:O,INPUT_MOVE:P,INPUT_END:Q,INPUT_CANCEL:R,STATE_POSSIBLE:Rb,STATE_BEGAN:Sb,STATE_CHANGED:Tb,STATE_ENDED:Ub,STATE_RECOGNIZED:Vb,STATE_CANCELLED:Wb,STATE_FAILED:Xb,DIRECTION_NONE:S,DIRECTION_LEFT:T,DIRECTION_RIGHT:U,DIRECTION_UP:V,DIRECTION_DOWN:W,DIRECTION_HORIZONTAL:X,DIRECTION_VERTICAL:Y,DIRECTION_ALL:Z,Manager:kc,Input:ab,TouchAction:Pb,TouchInput:Eb,MouseInput:rb,PointerEventInput:wb,TouchMouseInput:Gb,SingleTouchInput:Ab,Recognizer:Yb,AttrRecognizer:ac,Tap:gc,Pan:bc,Swipe:fc,Pinch:cc,Rotate:ec,Press:dc,on:t,off:u,each:m,merge:o,extend:n,inherit:p,bindFn:q,prefixed:B}),typeof define==g&&define.amd?define(function(){return hc}):"undefined"!=typeof module&&module.exports?module.exports=hc:a[c]=hc}(window,document,"Hammer");
|
@@ -1,136 +0,0 @@
|
|
1
|
-
(function($){
|
2
|
-
$(function(){
|
3
|
-
|
4
|
-
var window_width = $(window).width();
|
5
|
-
|
6
|
-
// convert rgb to hex value string
|
7
|
-
function rgb2hex(rgb) {
|
8
|
-
if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; }
|
9
|
-
|
10
|
-
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
11
|
-
|
12
|
-
if (rgb === null) { return "N/A"; }
|
13
|
-
|
14
|
-
function hex(x) {
|
15
|
-
return ("0" + parseInt(x).toString(16)).slice(-2);
|
16
|
-
}
|
17
|
-
|
18
|
-
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
19
|
-
}
|
20
|
-
|
21
|
-
$('.dynamic-color .col').each(function () {
|
22
|
-
$(this).children().each(function () {
|
23
|
-
var color = $(this).css('background-color'),
|
24
|
-
classes = $(this).attr('class');
|
25
|
-
$(this).html(rgb2hex(color) + " " + classes);
|
26
|
-
if (classes.indexOf("darken") >= 0 || $(this).hasClass('black')) {
|
27
|
-
$(this).css('color', 'rgba(255,255,255,.9');
|
28
|
-
}
|
29
|
-
});
|
30
|
-
});
|
31
|
-
|
32
|
-
|
33
|
-
// Floating-Fixed table of contents
|
34
|
-
if ($('nav').length) {
|
35
|
-
$('.toc-wrapper').pushpin({ top: $('nav').height() });
|
36
|
-
}
|
37
|
-
else if ($('#index-banner').length) {
|
38
|
-
$('.toc-wrapper').pushpin({ top: $('#index-banner').height() });
|
39
|
-
}
|
40
|
-
else {
|
41
|
-
$('.toc-wrapper').pushpin({ top: 0 });
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
// BuySellAds Detection
|
47
|
-
var $bsa = $(".buysellads"),
|
48
|
-
$timesToCheck = 3;
|
49
|
-
function checkForChanges() {
|
50
|
-
if (!$bsa.find('#carbonads').length) {
|
51
|
-
$timesToCheck -= 1;
|
52
|
-
if ($timesToCheck >= 0) {
|
53
|
-
setTimeout(checkForChanges, 500);
|
54
|
-
}
|
55
|
-
else {
|
56
|
-
var donateAd = $('<div id="carbonads"><span><a class="carbon-text" href="#!" onclick="document.getElementById(\'paypal-donate\').submit();"><img src="images/donate.png" /> Help support us by turning off adblock. If you still prefer to keep adblock on for this page but still want to support us, feel free to donate. Any little bit helps.</a></form></span></div>');
|
57
|
-
|
58
|
-
$bsa.append(donateAd);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
}
|
63
|
-
checkForChanges();
|
64
|
-
|
65
|
-
|
66
|
-
// Github Latest Commit
|
67
|
-
if ($('.github-commit').length) { // Checks if widget div exists (Index only)
|
68
|
-
$.ajax({
|
69
|
-
url: "https://api.github.com/repos/dogfalo/materialize/commits/master",
|
70
|
-
dataType: "json",
|
71
|
-
success: function (data) {
|
72
|
-
var sha = data.sha,
|
73
|
-
date = jQuery.timeago(data.commit.author.date);
|
74
|
-
if (window_width < 1120) {
|
75
|
-
sha = sha.substring(0,7);
|
76
|
-
}
|
77
|
-
$('.github-commit').find('.date').html(date);
|
78
|
-
$('.github-commit').find('.sha').html(sha).attr('href', data.html_url);
|
79
|
-
}
|
80
|
-
});
|
81
|
-
}
|
82
|
-
|
83
|
-
// Toggle Flow Text
|
84
|
-
var toggleFlowTextButton = $('#flow-toggle');
|
85
|
-
toggleFlowTextButton.click( function(){
|
86
|
-
$('#flow-text-demo').children('p').each(function(){
|
87
|
-
$(this).toggleClass('flow-text');
|
88
|
-
});
|
89
|
-
});
|
90
|
-
|
91
|
-
// Toggle Containers on page
|
92
|
-
var toggleContainersButton = $('#container-toggle-button');
|
93
|
-
toggleContainersButton.click(function(){
|
94
|
-
$('body .browser-window .container, .had-container').each(function(){
|
95
|
-
$(this).toggleClass('had-container');
|
96
|
-
$(this).toggleClass('container');
|
97
|
-
if ($(this).hasClass('container')) {
|
98
|
-
toggleContainersButton.text("Turn off Containers");
|
99
|
-
}
|
100
|
-
else {
|
101
|
-
toggleContainersButton.text("Turn on Containers");
|
102
|
-
}
|
103
|
-
});
|
104
|
-
});
|
105
|
-
|
106
|
-
// Detect touch screen and enable scrollbar if necessary
|
107
|
-
function is_touch_device() {
|
108
|
-
try {
|
109
|
-
document.createEvent("TouchEvent");
|
110
|
-
return true;
|
111
|
-
} catch (e) {
|
112
|
-
return false;
|
113
|
-
}
|
114
|
-
}
|
115
|
-
if (is_touch_device()) {
|
116
|
-
$('#nav-mobile').css({ overflow: 'auto'});
|
117
|
-
}
|
118
|
-
|
119
|
-
// Set checkbox on forms.html to indeterminate
|
120
|
-
var indeterminateCheckbox = document.getElementById('indeterminate-checkbox');
|
121
|
-
if (indeterminateCheckbox !== null)
|
122
|
-
indeterminateCheckbox.indeterminate = true;
|
123
|
-
|
124
|
-
|
125
|
-
// Plugin initialization
|
126
|
-
$('.slider').slider({full_width: true});
|
127
|
-
$('.parallax').parallax();
|
128
|
-
$('.modal-trigger').leanModal();
|
129
|
-
$('.scrollspy').scrollSpy();
|
130
|
-
$('.button-collapse').sideNav({'edge': 'left'});
|
131
|
-
$('.datepicker').pickadate({selectYears: 20});
|
132
|
-
$('select').not('.disabled').material_select();
|
133
|
-
|
134
|
-
|
135
|
-
}); // end of document ready
|
136
|
-
})(jQuery); // end of jQuery name space
|
@@ -1,205 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
3
|
-
*
|
4
|
-
* Uses the built in easing capabilities added In jQuery 1.1
|
5
|
-
* to offer multiple easing options
|
6
|
-
*
|
7
|
-
* TERMS OF USE - jQuery Easing
|
8
|
-
*
|
9
|
-
* Open source under the BSD License.
|
10
|
-
*
|
11
|
-
* Copyright © 2008 George McGinley Smith
|
12
|
-
* All rights reserved.
|
13
|
-
*
|
14
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
15
|
-
* are permitted provided that the following conditions are met:
|
16
|
-
*
|
17
|
-
* Redistributions of source code must retain the above copyright notice, this list of
|
18
|
-
* conditions and the following disclaimer.
|
19
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list
|
20
|
-
* of conditions and the following disclaimer in the documentation and/or other materials
|
21
|
-
* provided with the distribution.
|
22
|
-
*
|
23
|
-
* Neither the name of the author nor the names of contributors may be used to endorse
|
24
|
-
* or promote products derived from this software without specific prior written permission.
|
25
|
-
*
|
26
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
27
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
28
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
29
|
-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
30
|
-
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
31
|
-
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
32
|
-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
33
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
34
|
-
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
35
|
-
*
|
36
|
-
*/
|
37
|
-
|
38
|
-
// t: current time, b: begInnIng value, c: change In value, d: duration
|
39
|
-
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
40
|
-
|
41
|
-
jQuery.extend( jQuery.easing,
|
42
|
-
{
|
43
|
-
def: 'easeOutQuad',
|
44
|
-
swing: function (x, t, b, c, d) {
|
45
|
-
//alert(jQuery.easing.default);
|
46
|
-
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
47
|
-
},
|
48
|
-
easeInQuad: function (x, t, b, c, d) {
|
49
|
-
return c*(t/=d)*t + b;
|
50
|
-
},
|
51
|
-
easeOutQuad: function (x, t, b, c, d) {
|
52
|
-
return -c *(t/=d)*(t-2) + b;
|
53
|
-
},
|
54
|
-
easeInOutQuad: function (x, t, b, c, d) {
|
55
|
-
if ((t/=d/2) < 1) return c/2*t*t + b;
|
56
|
-
return -c/2 * ((--t)*(t-2) - 1) + b;
|
57
|
-
},
|
58
|
-
easeInCubic: function (x, t, b, c, d) {
|
59
|
-
return c*(t/=d)*t*t + b;
|
60
|
-
},
|
61
|
-
easeOutCubic: function (x, t, b, c, d) {
|
62
|
-
return c*((t=t/d-1)*t*t + 1) + b;
|
63
|
-
},
|
64
|
-
easeInOutCubic: function (x, t, b, c, d) {
|
65
|
-
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
66
|
-
return c/2*((t-=2)*t*t + 2) + b;
|
67
|
-
},
|
68
|
-
easeInQuart: function (x, t, b, c, d) {
|
69
|
-
return c*(t/=d)*t*t*t + b;
|
70
|
-
},
|
71
|
-
easeOutQuart: function (x, t, b, c, d) {
|
72
|
-
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
73
|
-
},
|
74
|
-
easeInOutQuart: function (x, t, b, c, d) {
|
75
|
-
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
76
|
-
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
77
|
-
},
|
78
|
-
easeInQuint: function (x, t, b, c, d) {
|
79
|
-
return c*(t/=d)*t*t*t*t + b;
|
80
|
-
},
|
81
|
-
easeOutQuint: function (x, t, b, c, d) {
|
82
|
-
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
83
|
-
},
|
84
|
-
easeInOutQuint: function (x, t, b, c, d) {
|
85
|
-
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
86
|
-
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
87
|
-
},
|
88
|
-
easeInSine: function (x, t, b, c, d) {
|
89
|
-
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
90
|
-
},
|
91
|
-
easeOutSine: function (x, t, b, c, d) {
|
92
|
-
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
93
|
-
},
|
94
|
-
easeInOutSine: function (x, t, b, c, d) {
|
95
|
-
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
96
|
-
},
|
97
|
-
easeInExpo: function (x, t, b, c, d) {
|
98
|
-
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
99
|
-
},
|
100
|
-
easeOutExpo: function (x, t, b, c, d) {
|
101
|
-
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
102
|
-
},
|
103
|
-
easeInOutExpo: function (x, t, b, c, d) {
|
104
|
-
if (t==0) return b;
|
105
|
-
if (t==d) return b+c;
|
106
|
-
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
107
|
-
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
108
|
-
},
|
109
|
-
easeInCirc: function (x, t, b, c, d) {
|
110
|
-
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
111
|
-
},
|
112
|
-
easeOutCirc: function (x, t, b, c, d) {
|
113
|
-
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
114
|
-
},
|
115
|
-
easeInOutCirc: function (x, t, b, c, d) {
|
116
|
-
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
117
|
-
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
118
|
-
},
|
119
|
-
easeInElastic: function (x, t, b, c, d) {
|
120
|
-
var s=1.70158;var p=0;var a=c;
|
121
|
-
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
122
|
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
123
|
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
124
|
-
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
125
|
-
},
|
126
|
-
easeOutElastic: function (x, t, b, c, d) {
|
127
|
-
var s=1.70158;var p=0;var a=c;
|
128
|
-
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
129
|
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
130
|
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
131
|
-
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
132
|
-
},
|
133
|
-
easeInOutElastic: function (x, t, b, c, d) {
|
134
|
-
var s=1.70158;var p=0;var a=c;
|
135
|
-
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
136
|
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
137
|
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
138
|
-
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
139
|
-
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
140
|
-
},
|
141
|
-
easeInBack: function (x, t, b, c, d, s) {
|
142
|
-
if (s == undefined) s = 1.70158;
|
143
|
-
return c*(t/=d)*t*((s+1)*t - s) + b;
|
144
|
-
},
|
145
|
-
easeOutBack: function (x, t, b, c, d, s) {
|
146
|
-
if (s == undefined) s = 1.70158;
|
147
|
-
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
148
|
-
},
|
149
|
-
easeInOutBack: function (x, t, b, c, d, s) {
|
150
|
-
if (s == undefined) s = 1.70158;
|
151
|
-
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
152
|
-
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
153
|
-
},
|
154
|
-
easeInBounce: function (x, t, b, c, d) {
|
155
|
-
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
156
|
-
},
|
157
|
-
easeOutBounce: function (x, t, b, c, d) {
|
158
|
-
if ((t/=d) < (1/2.75)) {
|
159
|
-
return c*(7.5625*t*t) + b;
|
160
|
-
} else if (t < (2/2.75)) {
|
161
|
-
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
162
|
-
} else if (t < (2.5/2.75)) {
|
163
|
-
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
164
|
-
} else {
|
165
|
-
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
166
|
-
}
|
167
|
-
},
|
168
|
-
easeInOutBounce: function (x, t, b, c, d) {
|
169
|
-
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
170
|
-
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
171
|
-
}
|
172
|
-
});
|
173
|
-
|
174
|
-
/*
|
175
|
-
*
|
176
|
-
* TERMS OF USE - EASING EQUATIONS
|
177
|
-
*
|
178
|
-
* Open source under the BSD License.
|
179
|
-
*
|
180
|
-
* Copyright © 2001 Robert Penner
|
181
|
-
* All rights reserved.
|
182
|
-
*
|
183
|
-
* Redistribution and use in source and binary forms, with or without modification,
|
184
|
-
* are permitted provided that the following conditions are met:
|
185
|
-
*
|
186
|
-
* Redistributions of source code must retain the above copyright notice, this list of
|
187
|
-
* conditions and the following disclaimer.
|
188
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list
|
189
|
-
* of conditions and the following disclaimer in the documentation and/or other materials
|
190
|
-
* provided with the distribution.
|
191
|
-
*
|
192
|
-
* Neither the name of the author nor the names of contributors may be used to endorse
|
193
|
-
* or promote products derived from this software without specific prior written permission.
|
194
|
-
*
|
195
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
196
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
197
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
198
|
-
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
199
|
-
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
200
|
-
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
201
|
-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
202
|
-
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
203
|
-
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
204
|
-
*
|
205
|
-
*/
|
@@ -1,33 +0,0 @@
|
|
1
|
-
(function(factory) {
|
2
|
-
if (typeof define === 'function' && define.amd) {
|
3
|
-
define(['jquery', 'hammerjs'], factory);
|
4
|
-
} else if (typeof exports === 'object') {
|
5
|
-
factory(require('jquery'), require('hammerjs'));
|
6
|
-
} else {
|
7
|
-
factory(jQuery, Hammer);
|
8
|
-
}
|
9
|
-
}(function($, Hammer) {
|
10
|
-
function hammerify(el, options) {
|
11
|
-
var $el = $(el);
|
12
|
-
if(!$el.data("hammer")) {
|
13
|
-
$el.data("hammer", new Hammer($el[0], options));
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
$.fn.hammer = function(options) {
|
18
|
-
return this.each(function() {
|
19
|
-
hammerify(this, options);
|
20
|
-
});
|
21
|
-
};
|
22
|
-
|
23
|
-
// extend the emit method to also trigger jQuery events
|
24
|
-
Hammer.Manager.prototype.emit = (function(originalEmit) {
|
25
|
-
return function(type, data) {
|
26
|
-
originalEmit.call(this, type, data);
|
27
|
-
$(this.element).trigger({
|
28
|
-
type: type,
|
29
|
-
gesture: data
|
30
|
-
});
|
31
|
-
};
|
32
|
-
})(Hammer.Manager.prototype.emit);
|
33
|
-
}));
|
@@ -1 +0,0 @@
|
|
1
|
-
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(){var e=a(this),o=r.settings;return isNaN(e.datetime)||(0==o.cutoff||Math.abs(n(e.datetime))<o.cutoff)&&t(this).text(i(e.datetime)),this}function a(e){if(e=t(e),!e.data("timeago")){e.data("timeago",{datetime:r.datetime(e)});var a=t.trim(e.text());r.settings.localeTitle?e.attr("title",e.data("timeago").datetime.toLocaleString()):!(a.length>0)||r.isTime(e)&&e.attr("title")||e.attr("title",a)}return e.data("timeago")}function i(t){return r.inWords(n(t))}function n(t){return(new Date).getTime()-t.getTime()}t.timeago=function(e){return i(e instanceof Date?e:"string"==typeof e?t.timeago.parse(e):"number"==typeof e?new Date(e):t.timeago.datetime(e))};var r=t.timeago;t.extend(t.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(e){function a(a,n){var r=t.isFunction(a)?a(n,e):a,o=i.numbers&&i.numbers[n]||n;return r.replace(/%d/i,o)}if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var i=this.settings.strings,n=i.prefixAgo,r=i.suffixAgo;if(this.settings.allowFuture&&0>e&&(n=i.prefixFromNow,r=i.suffixFromNow),!this.settings.allowPast&&e>=0)return this.settings.strings.inPast;var o=Math.abs(e)/1e3,s=o/60,u=s/60,m=u/24,l=m/365,d=45>o&&a(i.seconds,Math.round(o))||90>o&&a(i.minute,1)||45>s&&a(i.minutes,Math.round(s))||90>s&&a(i.hour,1)||24>u&&a(i.hours,Math.round(u))||42>u&&a(i.day,1)||30>m&&a(i.days,Math.round(m))||45>m&&a(i.month,1)||365>m&&a(i.months,Math.round(m/30))||1.5>l&&a(i.year,1)||a(i.years,Math.round(l)),f=i.wordSeparator||"";return void 0===i.wordSeparator&&(f=" "),t.trim([n,d,r].join(f))},parse:function(e){var a=t.trim(e);return a=a.replace(/\.\d+/,""),a=a.replace(/-/,"/").replace(/-/,"/"),a=a.replace(/T/," ").replace(/Z/," UTC"),a=a.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),a=a.replace(/([\+\-]\d\d)$/," $100"),new Date(a)},datetime:function(e){var a=t(e).attr(r.isTime(e)?"datetime":"title");return r.parse(a)},isTime:function(e){return"time"===t(e).get(0).tagName.toLowerCase()}});var o={init:function(){var a=t.proxy(e,this);a();var i=r.settings;i.refreshMillis>0&&(this._timeagoInterval=setInterval(a,i.refreshMillis))},update:function(a){var i=r.parse(a);t(this).data("timeago",{datetime:i}),r.settings.localeTitle&&t(this).attr("title",i.toLocaleString()),e.apply(this)},updateFromDOM:function(){t(this).data("timeago",{datetime:r.parse(t(this).attr(r.isTime(this)?"datetime":"title"))}),e.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};t.fn.timeago=function(t,e){var a=t?o[t]:o.init;if(!a)throw new Error("Unknown function name '"+t+"' for timeago");return this.each(function(){a.call(this,e)}),this},document.createElement("abbr"),document.createElement("time")});
|
@@ -1,178 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
var _stack = 0,
|
3
|
-
_lastID = 0,
|
4
|
-
_generateID = function() {
|
5
|
-
_lastID++;
|
6
|
-
return 'materialize-lean-overlay-' + _lastID;
|
7
|
-
};
|
8
|
-
|
9
|
-
$.fn.extend({
|
10
|
-
openModal: function(options) {
|
11
|
-
|
12
|
-
$('body').css('overflow', 'hidden');
|
13
|
-
|
14
|
-
var defaults = {
|
15
|
-
opacity: 0.5,
|
16
|
-
in_duration: 350,
|
17
|
-
out_duration: 250,
|
18
|
-
ready: undefined,
|
19
|
-
complete: undefined,
|
20
|
-
dismissible: true,
|
21
|
-
starting_top: '4%'
|
22
|
-
},
|
23
|
-
overlayID = _generateID(),
|
24
|
-
$modal = $(this),
|
25
|
-
$overlay = $('<div class="lean-overlay"></div>'),
|
26
|
-
lStack = (++_stack);
|
27
|
-
|
28
|
-
// Store a reference of the overlay
|
29
|
-
$overlay.attr('id', overlayID).css('z-index', 1000 + lStack * 2);
|
30
|
-
$modal.data('overlay-id', overlayID).css('z-index', 1000 + lStack * 2 + 1);
|
31
|
-
|
32
|
-
$("body").append($overlay);
|
33
|
-
|
34
|
-
// Override defaults
|
35
|
-
options = $.extend(defaults, options);
|
36
|
-
|
37
|
-
if (options.dismissible) {
|
38
|
-
$overlay.click(function() {
|
39
|
-
$modal.closeModal(options);
|
40
|
-
});
|
41
|
-
// Return on ESC
|
42
|
-
$(document).on('keyup.leanModal' + overlayID, function(e) {
|
43
|
-
if (e.keyCode === 27) { // ESC key
|
44
|
-
$modal.closeModal(options);
|
45
|
-
}
|
46
|
-
});
|
47
|
-
}
|
48
|
-
|
49
|
-
$modal.find(".modal-close").on('click.close', function(e) {
|
50
|
-
$modal.closeModal(options);
|
51
|
-
});
|
52
|
-
|
53
|
-
$overlay.css({ display : "block", opacity : 0 });
|
54
|
-
|
55
|
-
$modal.css({
|
56
|
-
display : "block",
|
57
|
-
opacity: 0
|
58
|
-
});
|
59
|
-
|
60
|
-
$overlay.velocity({opacity: options.opacity}, {duration: options.in_duration, queue: false, ease: "easeOutCubic"});
|
61
|
-
$modal.data('associated-overlay', $overlay[0]);
|
62
|
-
|
63
|
-
// Define Bottom Sheet animation
|
64
|
-
if ($modal.hasClass('bottom-sheet')) {
|
65
|
-
$modal.velocity({bottom: "0", opacity: 1}, {
|
66
|
-
duration: options.in_duration,
|
67
|
-
queue: false,
|
68
|
-
ease: "easeOutCubic",
|
69
|
-
// Handle modal ready callback
|
70
|
-
complete: function() {
|
71
|
-
if (typeof(options.ready) === "function") {
|
72
|
-
options.ready();
|
73
|
-
}
|
74
|
-
}
|
75
|
-
});
|
76
|
-
}
|
77
|
-
else {
|
78
|
-
$.Velocity.hook($modal, "scaleX", 0.7);
|
79
|
-
$modal.css({ top: options.starting_top });
|
80
|
-
$modal.velocity({top: "10%", opacity: 1, scaleX: '1'}, {
|
81
|
-
duration: options.in_duration,
|
82
|
-
queue: false,
|
83
|
-
ease: "easeOutCubic",
|
84
|
-
// Handle modal ready callback
|
85
|
-
complete: function() {
|
86
|
-
if (typeof(options.ready) === "function") {
|
87
|
-
options.ready();
|
88
|
-
}
|
89
|
-
}
|
90
|
-
});
|
91
|
-
}
|
92
|
-
|
93
|
-
|
94
|
-
}
|
95
|
-
});
|
96
|
-
|
97
|
-
$.fn.extend({
|
98
|
-
closeModal: function(options) {
|
99
|
-
var defaults = {
|
100
|
-
out_duration: 250,
|
101
|
-
complete: undefined
|
102
|
-
},
|
103
|
-
$modal = $(this),
|
104
|
-
overlayID = $modal.data('overlay-id'),
|
105
|
-
$overlay = $('#' + overlayID);
|
106
|
-
|
107
|
-
options = $.extend(defaults, options);
|
108
|
-
|
109
|
-
// Disable scrolling
|
110
|
-
$('body').css('overflow', '');
|
111
|
-
|
112
|
-
$modal.find('.modal-close').off('click.close');
|
113
|
-
$(document).off('keyup.leanModal' + overlayID);
|
114
|
-
|
115
|
-
$overlay.velocity( { opacity: 0}, {duration: options.out_duration, queue: false, ease: "easeOutQuart"});
|
116
|
-
|
117
|
-
|
118
|
-
// Define Bottom Sheet animation
|
119
|
-
if ($modal.hasClass('bottom-sheet')) {
|
120
|
-
$modal.velocity({bottom: "-100%", opacity: 0}, {
|
121
|
-
duration: options.out_duration,
|
122
|
-
queue: false,
|
123
|
-
ease: "easeOutCubic",
|
124
|
-
// Handle modal ready callback
|
125
|
-
complete: function() {
|
126
|
-
$overlay.css({display:"none"});
|
127
|
-
|
128
|
-
// Call complete callback
|
129
|
-
if (typeof(options.complete) === "function") {
|
130
|
-
options.complete();
|
131
|
-
}
|
132
|
-
$overlay.remove();
|
133
|
-
_stack--;
|
134
|
-
}
|
135
|
-
});
|
136
|
-
}
|
137
|
-
else {
|
138
|
-
$modal.velocity(
|
139
|
-
{ top: options.starting_top, opacity: 0, scaleX: 0.7}, {
|
140
|
-
duration: options.out_duration,
|
141
|
-
complete:
|
142
|
-
function() {
|
143
|
-
|
144
|
-
$(this).css('display', 'none');
|
145
|
-
// Call complete callback
|
146
|
-
if (typeof(options.complete) === "function") {
|
147
|
-
options.complete();
|
148
|
-
}
|
149
|
-
$overlay.remove();
|
150
|
-
_stack--;
|
151
|
-
}
|
152
|
-
}
|
153
|
-
);
|
154
|
-
}
|
155
|
-
}
|
156
|
-
});
|
157
|
-
|
158
|
-
$.fn.extend({
|
159
|
-
leanModal: function(option) {
|
160
|
-
return this.each(function() {
|
161
|
-
|
162
|
-
var defaults = {
|
163
|
-
starting_top: '4%'
|
164
|
-
},
|
165
|
-
// Override defaults
|
166
|
-
options = $.extend(defaults, option);
|
167
|
-
|
168
|
-
// Close Handlers
|
169
|
-
$(this).click(function(e) {
|
170
|
-
options.starting_top = ($(this).offset().top - $(window).scrollTop()) /1.15;
|
171
|
-
var modal_id = $(this).attr("href") || '#' + $(this).data('target');
|
172
|
-
$(modal_id).openModal(options);
|
173
|
-
e.preventDefault();
|
174
|
-
}); // done set on click
|
175
|
-
}); // done return
|
176
|
-
}
|
177
|
-
});
|
178
|
-
})(jQuery);
|