materialize-sass 0.97.0 → 0.97.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/materialize-sprockets.js +4 -0
- data/app/assets/javascripts/materialize.js +242 -182
- data/app/assets/javascripts/materialize/cards.js +1 -1
- data/app/assets/javascripts/materialize/chips.js +9 -0
- data/app/assets/javascripts/materialize/dropdown.js +31 -9
- data/app/assets/javascripts/materialize/extras/nouislider.js +1666 -0
- data/app/assets/javascripts/materialize/extras/nouislider.min.js +6 -0
- data/app/assets/javascripts/materialize/forms.js +27 -19
- data/app/assets/javascripts/materialize/global.js +1 -1
- data/app/assets/javascripts/materialize/scrollFire.js +1 -1
- data/app/assets/javascripts/materialize/sideNav.js +17 -14
- data/app/assets/javascripts/materialize/tabs.js +2 -9
- data/app/assets/javascripts/materialize/toasts.js +13 -2
- data/app/assets/javascripts/materialize/tooltip.js +144 -133
- data/app/assets/stylesheets/materialize.scss +2 -1
- data/app/assets/stylesheets/materialize/components/_cards.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_chips.scss +27 -0
- data/app/assets/stylesheets/materialize/components/_collapsible.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_form.scss +4 -2
- data/app/assets/stylesheets/materialize/components/_global.scss +17 -6
- data/app/assets/stylesheets/materialize/components/_materialbox.scss +1 -0
- data/app/assets/stylesheets/materialize/components/_navbar.scss +11 -0
- data/app/assets/stylesheets/materialize/components/_preloader.scss +2 -0
- data/app/assets/stylesheets/materialize/components/_roboto.scss +8 -4
- data/app/assets/stylesheets/materialize/components/_tabs.scss +5 -0
- data/app/assets/stylesheets/materialize/components/_toast.scss +1 -1
- data/app/assets/stylesheets/materialize/components/_typography.scss +4 -1
- data/app/assets/stylesheets/materialize/components/_variables.scss +3 -0
- data/app/assets/stylesheets/materialize/extras/nouislider.css +258 -0
- data/lib/materialize-sass/version.rb +1 -1
- metadata +7 -2
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Materialize v0.97.1 (http://materializecss.com)
|
3
|
+
* Copyright 2014-2015 Materialize
|
4
|
+
* MIT License (https://raw.githubusercontent.com/Dogfalo/materialize/master/LICENSE)
|
5
|
+
*/
|
6
|
+
!function(){function a(a){return a.split("").reverse().join("")}function b(a,b,c){if((a[b]||a[c])&&a[b]===a[c])throw Error(b)}function c(b,c,d,e,f,g,h,i,j,k,l,m){h=m;var n,o=l="";return g&&(m=g(m)),"number"==typeof m&&isFinite(m)?(b&&0===parseFloat(m.toFixed(b))&&(m=0),0>m&&(n=!0,m=Math.abs(m)),b&&(g=Math.pow(10,b),m=(Math.round(m*g)/g).toFixed(b)),m=m.toString(),-1!==m.indexOf(".")&&(b=m.split("."),m=b[0],d&&(l=d+b[1])),c&&(m=a(m).match(/.{1,3}/g),m=a(m.join(a(c)))),n&&i&&(o+=i),e&&(o+=e),n&&j&&(o+=j),o=o+m+l,f&&(o+=f),k&&(o=k(o,h)),o):!1}function d(a,b,c,d,e,f,g,h,i,j,k,l){var m;return a="",k&&(l=k(l)),l&&"string"==typeof l?(h&&l.substring(0,h.length)===h&&(l=l.replace(h,""),m=!0),d&&l.substring(0,d.length)===d&&(l=l.replace(d,"")),i&&l.substring(0,i.length)===i&&(l=l.replace(i,""),m=!0),e&&l.slice(-1*e.length)===e&&(l=l.slice(0,-1*e.length)),b&&(l=l.split(b).join("")),c&&(l=l.replace(c,".")),m&&(a+="-"),a=Number((a+l).replace(/[^0-9\.\-.]/g,"")),g&&(a=g(a)),"number"==typeof a&&isFinite(a)?a:!1):!1}function e(a){var c,d,e,f={};for(c=0;c<h.length;c+=1)d=h[c],e=a[d],void 0===e?f[d]="negative"!==d||f.negativeBefore?"mark"===d&&"."!==f.thousand?".":!1:"-":"decimals"===d?e>0&&8>e&&(f[d]=e):"encoder"===d||"decoder"===d||"edit"===d||"undo"===d?"function"==typeof e&&(f[d]=e):"string"==typeof e&&(f[d]=e);return b(f,"mark","thousand"),b(f,"prefix","negative"),b(f,"prefix","negativeBefore"),f}function f(a,b,c){var d,e=[];for(d=0;d<h.length;d+=1)e.push(a[h[d]]);return e.push(c),b.apply("",e)}function g(a){return this instanceof g?void("object"==typeof a&&(a=e(a),this.to=function(b){return f(a,c,b)},this.from=function(b){return f(a,d,b)})):new g(a)}var h="decimals thousand mark prefix postfix encoder decoder negativeBefore negative edit undo".split(" ");window.wNumb=g}(),function(a){if("function"==typeof define&&define.amd)define([],a);else if("object"==typeof exports){var b=require("fs");module.exports=a(),module.exports.css=function(){return b.readFileSync(__dirname+"/nouislider.min.css","utf8")}}else window.noUiSlider=a()}(function(){"use strict";function a(a){return a.filter(function(a){return this[a]?!1:this[a]=!0},{})}function b(a,b){return Math.round(a/b)*b}function c(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.defaultView||c.parentWindow,e=c.documentElement,f=d.pageXOffset;return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(f=0),{top:b.top+d.pageYOffset-e.clientTop,left:b.left+f-e.clientLeft}}function d(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function e(a){var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function f(a,b,c){j(a,b),setTimeout(function(){k(a,b)},c)}function g(a){return Math.max(Math.min(a,100),0)}function h(a){return Array.isArray(a)?a:[a]}function i(a){var b=a.split(".");return b.length>1?b[1].length:0}function j(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function k(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(a,b){a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function m(a,b){return 100/(b-a)}function n(a,b){return 100*b/(a[1]-a[0])}function o(a,b){return n(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function p(a,b){return b*(a[1]-a[0])/100+a[0]}function q(a,b){for(var c=1;a>=b[c];)c+=1;return c}function r(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=q(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+o([d,e],c)/m(f,g)}function s(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=q(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],p([d,e],(c-f)*m(f,g))}function t(a,c,d,e){if(100===e)return e;var f,g,h=q(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function u(a,b,c){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!d(e)||!d(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");c.xPct.push(e),c.xVal.push(b[0]),e?c.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(c.xSteps[0]=b[1])}function v(a,b,c){return b?void(c.xSteps[a]=n([c.xVal[a],c.xVal[a+1]],b)/m(c.xPct[a],c.xPct[a+1])):!0}function w(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)u(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)v(e,this.xNumSteps[e],this)}function x(a,b){if(!d(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function y(a,b){if("object"!=typeof b||Array.isArray(b))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");a.spectrum=new w(b,a.snap,a.dir,a.singleStep)}function z(a,b){if(b=h(b),!Array.isArray(b)||!b.length||b.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");a.handles=b.length,a.start=b}function A(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function B(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function C(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function D(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function E(a,b){if(!d(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function F(a,b){if(!d(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function G(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function H(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;a.events={tap:c||f,drag:d,fixed:e,snap:f}}function I(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function J(a){var b,c={margin:0,limit:0,animate:!0,format:U};b={step:{r:!1,t:x},start:{r:!0,t:z},connect:{r:!0,t:C},direction:{r:!0,t:G},snap:{r:!1,t:A},animate:{r:!1,t:B},range:{r:!0,t:y},orientation:{r:!1,t:D},margin:{r:!1,t:E},limit:{r:!1,t:F},behaviour:{r:!0,t:H},format:{r:!1,t:I}};var d={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(d).forEach(function(b){void 0===a[b]&&(a[b]=d[b])}),Object.keys(b).forEach(function(d){var e=b[d];if(void 0===a[d]){if(e.r)throw new Error("noUiSlider: '"+d+"' is required.");return!0}e.t(c,a[d])}),c.pips=a.pips,c.style=c.ort?"top":"left",c}function K(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[g(d),g(e)]):[d,e]}function L(a){a.preventDefault();var b,c,d=0===a.type.indexOf("touch"),e=0===a.type.indexOf("mouse"),f=0===a.type.indexOf("pointer"),g=a;return 0===a.type.indexOf("MSPointer")&&(f=!0),d&&(b=a.changedTouches[0].pageX,c=a.changedTouches[0].pageY),(e||f)&&(b=a.clientX+window.pageXOffset,c=a.clientY+window.pageYOffset),g.points=[b,c],g.cursor=e||f,g}function M(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=["-lower","-upper"];return a&&e.reverse(),j(d,T[3]),j(d,T[3]+e[b]),j(c,T[2]),c.appendChild(d),c}function N(a,b,c){switch(a){case 1:j(b,T[7]),j(c[0],T[6]);break;case 3:j(c[1],T[6]);case 2:j(c[0],T[7]);case 0:j(b,T[6])}}function O(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(c.appendChild(M(b,d)));return e}function P(a,b,c){j(c,T[0]),j(c,T[8+a]),j(c,T[4+b]);var d=document.createElement("div");return j(d,T[1]),c.appendChild(d),d}function Q(b,d){function e(a,b,c){if("range"===a||"steps"===a)return M.xVal;if("count"===a){var d,e=100/(b-1),f=0;for(b=[];(d=f++*e)<=100;)b.push(d);a="positions"}return"positions"===a?b.map(function(a){return M.fromStepping(c?M.getStep(a):a)}):"values"===a?c?b.map(function(a){return M.fromStepping(M.getStep(M.toStepping(a)))}):b:void 0}function m(b,c,d){var e=M.direction,f={},g=M.xVal[0],h=M.xVal[M.xVal.length-1],i=!1,j=!1,k=0;return M.direction=0,d=a(d.slice().sort(function(a,b){return a-b})),d[0]!==g&&(d.unshift(g),i=!0),d[d.length-1]!==h&&(d.push(h),j=!0),d.forEach(function(a,e){var g,h,l,m,n,o,p,q,r,s,t=a,u=d[e+1];if("steps"===c&&(g=M.xNumSteps[e]),g||(g=u-t),t!==!1&&void 0!==u)for(h=t;u>=h;h+=g){for(m=M.toStepping(h),n=m-k,q=n/b,r=Math.round(q),s=n/r,l=1;r>=l;l+=1)o=k+l*s,f[o.toFixed(5)]=["x",0];p=d.indexOf(h)>-1?1:"steps"===c?2:0,!e&&i&&(p=0),h===u&&j||(f[m.toFixed(5)]=[h,p]),k=m}}),M.direction=e,f}function n(a,b,c){function e(a){return["-normal","-large","-sub"][a]}function f(a,b,c){return'class="'+b+" "+b+"-"+h+" "+b+e(c[1])+'" style="'+d.style+": "+a+'%"'}function g(a,d){M.direction&&(a=100-a),d[1]=d[1]&&b?b(d[0],d[1]):d[1],i.innerHTML+="<div "+f(a,"noUi-marker",d)+"></div>",d[1]&&(i.innerHTML+="<div "+f(a,"noUi-value",d)+">"+c.to(d[0])+"</div>")}var h=["horizontal","vertical"][d.ort],i=document.createElement("div");return j(i,"noUi-pips"),j(i,"noUi-pips-"+h),Object.keys(a).forEach(function(b){g(b,a[b])}),i}function o(a){var b=a.mode,c=a.density||1,d=a.filter||!1,f=a.values||!1,g=a.stepped||!1,h=e(b,f,g),i=m(c,b,h),j=a.format||{to:Math.round};return I.appendChild(n(i,d,j))}function p(){return G["offset"+["Width","Height"][d.ort]]}function q(a,b){void 0!==b&&(b=Math.abs(b-d.dir)),Object.keys(R).forEach(function(c){var d=c.split(".")[0];a===d&&R[c].forEach(function(a){a(h(B()),b,r(Array.prototype.slice.call(Q)))})})}function r(a){return 1===a.length?a[0]:d.dir?a.reverse():a}function s(a,b,c,e){var f=function(b){return I.hasAttribute("disabled")?!1:l(I,T[14])?!1:(b=L(b),a===S.start&&void 0!==b.buttons&&b.buttons>1?!1:(b.calcPoint=b.points[d.ort],void c(b,e)))},g=[];return a.split(" ").forEach(function(a){b.addEventListener(a,f,!1),g.push([a,f])}),g}function t(a,b){var c,d,e=b.handles||H,f=!1,g=100*(a.calcPoint-b.start)/p(),h=e[0]===H[0]?0:1;if(c=K(g,b.positions,e.length>1),f=y(e[0],c[h],1===e.length),e.length>1){if(f=y(e[1],c[h?0:1],!1)||f)for(d=0;d<b.handles.length;d++)q("slide",d)}else f&&q("slide",h)}function u(a,b){var c=G.getElementsByClassName(T[15]),d=b.handles[0]===H[0]?0:1;c.length&&k(c[0],T[15]),a.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var e=document.documentElement;e.noUiListeners.forEach(function(a){e.removeEventListener(a[0],a[1])}),k(I,T[12]),q("set",d),q("change",d)}function v(a,b){var c=document.documentElement;if(1===b.handles.length&&(j(b.handles[0].children[0],T[15]),b.handles[0].hasAttribute("disabled")))return!1;a.stopPropagation();var d=s(S.move,c,t,{start:a.calcPoint,handles:b.handles,positions:[J[0],J[H.length-1]]}),e=s(S.end,c,u,{handles:b.handles});if(c.noUiListeners=d.concat(e),a.cursor){document.body.style.cursor=getComputedStyle(a.target).cursor,H.length>1&&j(I,T[12]);var f=function(){return!1};document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1)}}function w(a){var b,e,g=a.calcPoint,h=0;return a.stopPropagation(),H.forEach(function(a){h+=c(a)[d.style]}),b=h/2>g||1===H.length?0:1,g-=c(G)[d.style],e=100*g/p(),d.events.snap||f(I,T[14],300),H[b].hasAttribute("disabled")?!1:(y(H[b],e),q("slide",b),q("set",b),q("change",b),void(d.events.snap&&v(a,{handles:[H[h]]})))}function x(a){var b,c;if(!a.fixed)for(b=0;b<H.length;b+=1)s(S.start,H[b].children[0],v,{handles:[H[b]]});a.tap&&s(S.start,G,w,{handles:H}),a.drag&&(c=[G.getElementsByClassName(T[7])[0]],j(c[0],T[10]),a.fixed&&c.push(H[c[0]===H[0]?1:0].children[0]),c.forEach(function(a){s(S.start,a,v,{handles:H})}))}function y(a,b,c){var e=a!==H[0]?1:0,f=J[0]+d.margin,h=J[1]-d.margin,i=J[0]+d.limit,l=J[1]-d.limit;return H.length>1&&(b=e?Math.max(b,f):Math.min(b,h)),c!==!1&&d.limit&&H.length>1&&(b=e?Math.min(b,i):Math.max(b,l)),b=M.getStep(b),b=g(parseFloat(b.toFixed(7))),b===J[e]?!1:(a.style[d.style]=b+"%",a.previousSibling||(k(a,T[17]),b>50&&j(a,T[17])),J[e]=b,Q[e]=M.fromStepping(b),q("update",e),!0)}function z(a,b){var c,e,f;for(d.limit&&(a+=1),c=0;a>c;c+=1)e=c%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=d.format.from(f),(f===!1||isNaN(f)||y(H[e],M.toStepping(f),c===3-d.dir)===!1)&&q("update",e))}function A(a){var b,c,e=h(a);for(d.dir&&d.handles>1&&e.reverse(),d.animate&&-1!==J[0]&&f(I,T[14],300),b=H.length>1?3:1,1===e.length&&(b=1),z(b,e),c=0;c<H.length;c++)q("set",c)}function B(){var a,b=[];for(a=0;a<d.handles;a+=1)b[a]=d.format.to(Q[a]);return r(b)}function C(){T.forEach(function(a){a&&k(I,a)}),I.innerHTML="",delete I.noUiSlider}function D(){var a=J.map(function(a,b){var c=M.getApplicableStep(a),d=i(String(c[2])),e=Q[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),h=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[h,f]});return r(a)}function E(a,b){R[a]=R[a]||[],R[a].push(b),"update"===a.split(".")[0]&&H.forEach(function(a,b){q("update",b)})}function F(a){var b=a.split(".")[0],c=a.substring(b.length);Object.keys(R).forEach(function(a){var d=a.split(".")[0],e=a.substring(d.length);b&&b!==d||c&&c!==e||delete R[a]})}var G,H,I=b,J=[-1,-1],M=d.spectrum,Q=[],R={};if(I.noUiSlider)throw new Error("Slider was already initialized.");return G=P(d.dir,d.ort,I),H=O(d.handles,d.dir,G),N(d.connect,I,H),x(d.events),d.pips&&o(d.pips),{destroy:C,steps:D,on:E,off:F,get:B,set:A}}function R(a,b){if(!a.nodeName)throw new Error("noUiSlider.create requires a single element.");var c=J(b,a),d=Q(a,c);if(d.set(c.start),a.noUiSlider=d,b.tooltips===!0||void 0===b.tooltips){for(var e=a.getElementsByClassName("noUi-handle"),f=[],g=0;g<e.length;g++)f[g]=document.createElement("div"),e[g].appendChild(f[g]),f[g].className+="range-label",f[g].innerHTML="<span></span>",f[g]=f[g].getElementsByTagName("span")[0];a.noUiSlider.on("update",function(a,b){f[b].innerHTML=a[b]})}}var S=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},T=["noUi-target","noUi-base","noUi-origin","noUi-handle","noUi-horizontal","noUi-vertical","noUi-background","noUi-connect","noUi-ltr","noUi-rtl","noUi-dragable","","noUi-state-drag","","noUi-state-tap","noUi-active","","noUi-stacking"];w.prototype.getMargin=function(a){return 2===this.xPct.length?n(this.xVal,a):!1},w.prototype.toStepping=function(a){return a=r(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},w.prototype.fromStepping=function(a){return this.direction&&(a=100-a),e(s(this.xVal,this.xPct,a))},w.prototype.getStep=function(a){return this.direction&&(a=100-a),a=t(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},w.prototype.getApplicableStep=function(a){var b=q(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},w.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var U={to:function(a){return a.toFixed(2)},from:Number};return{create:R}});
|
@@ -6,7 +6,7 @@
|
|
6
6
|
var input_selector = 'input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea';
|
7
7
|
$(input_selector).each(function(index, element) {
|
8
8
|
if ($(element).val().length > 0 || $(this).attr('placeholder') !== undefined || $(element)[0].validity.badInput === true) {
|
9
|
-
$(this).siblings('label
|
9
|
+
$(this).siblings('label').addClass('active');
|
10
10
|
}
|
11
11
|
else {
|
12
12
|
$(this).siblings('label, i').removeClass('active');
|
@@ -23,7 +23,7 @@
|
|
23
23
|
// Add active if form auto complete
|
24
24
|
$(document).on('change', input_selector, function () {
|
25
25
|
if($(this).val().length !== 0 || $(this).attr('placeholder') !== undefined) {
|
26
|
-
$(this).siblings('label
|
26
|
+
$(this).siblings('label').addClass('active');
|
27
27
|
}
|
28
28
|
validate_field($(this));
|
29
29
|
});
|
@@ -62,10 +62,14 @@
|
|
62
62
|
if ($inputElement.val().length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') === undefined) {
|
63
63
|
$inputElement.siblings('label, i').removeClass('active');
|
64
64
|
}
|
65
|
+
|
66
|
+
if ($inputElement.val().length === 0 && $inputElement[0].validity.badInput !== true && $inputElement.attr('placeholder') !== undefined) {
|
67
|
+
$inputElement.siblings('i').removeClass('active');
|
68
|
+
}
|
65
69
|
validate_field($inputElement);
|
66
70
|
});
|
67
71
|
|
68
|
-
validate_field = function(object) {
|
72
|
+
window.validate_field = function(object) {
|
69
73
|
var hasLength = object.attr('length') !== undefined;
|
70
74
|
var lenAttr = parseInt(object.attr('length'));
|
71
75
|
var len = object.val().length;
|
@@ -79,7 +83,7 @@
|
|
79
83
|
else {
|
80
84
|
if (object.hasClass('validate')) {
|
81
85
|
// Check for character counter attributes
|
82
|
-
if ((object.is(':valid') && hasLength && (len
|
86
|
+
if ((object.is(':valid') && hasLength && (len <= lenAttr)) || (object.is(':valid') && !hasLength)) {
|
83
87
|
object.removeClass('invalid');
|
84
88
|
object.addClass('valid');
|
85
89
|
}
|
@@ -142,22 +146,24 @@
|
|
142
146
|
}
|
143
147
|
});
|
144
148
|
|
145
|
-
$('body').on('keyup keydown', text_area_selector, function () {
|
149
|
+
$('body').on('keyup keydown autoresize', text_area_selector, function () {
|
146
150
|
textareaAutoResize($(this));
|
147
151
|
});
|
148
152
|
|
149
153
|
|
150
154
|
// File Input Path
|
151
|
-
$('.file-field').each(function() {
|
152
|
-
var path_input = $(this).find('input.file-path');
|
153
|
-
$(this).find('input[type="file"]').change(function () {
|
154
|
-
if ($(this)[0].files.length){
|
155
|
-
path_input.val($(this)[0].files[0].name);
|
156
|
-
path_input.trigger('change');
|
157
|
-
}
|
158
|
-
});
|
159
|
-
});
|
160
155
|
|
156
|
+
$(document).on('change', '.file-field input[type="file"]', function () {
|
157
|
+
var file_field = $(this).closest('.file-field');
|
158
|
+
var path_input = file_field.find('input.file-path');
|
159
|
+
var files = $(this)[0].files;
|
160
|
+
var file_names = [];
|
161
|
+
for (var i = 0; i < files.length; i++) {
|
162
|
+
file_names.push(files[i].name);
|
163
|
+
}
|
164
|
+
path_input.val(file_names.join(", "));
|
165
|
+
path_input.trigger('change');
|
166
|
+
});
|
161
167
|
|
162
168
|
|
163
169
|
/****************
|
@@ -179,7 +185,7 @@
|
|
179
185
|
thumb.find('.value').html($(this).val());
|
180
186
|
});
|
181
187
|
|
182
|
-
$(document).on('mousedown touchstart', range_type, function(e) {
|
188
|
+
$(document).on('input mousedown touchstart', range_type, function(e) {
|
183
189
|
var thumb = $(this).siblings('.thumb');
|
184
190
|
|
185
191
|
// If thumb indicator does not exist yet, create it
|
@@ -245,9 +251,8 @@
|
|
245
251
|
left = width;
|
246
252
|
}
|
247
253
|
thumb.addClass('active').css('left', left);
|
248
|
-
|
254
|
+
thumb.find('.value').html(thumb.siblings(range_type).val());
|
249
255
|
}
|
250
|
-
|
251
256
|
});
|
252
257
|
|
253
258
|
$(document).on('mouseout touchleave', range_wrapper, function() {
|
@@ -279,7 +284,7 @@
|
|
279
284
|
// Tear down structure if Select needs to be rebuilt
|
280
285
|
var lastID = $select.data('select-id');
|
281
286
|
if (lastID) {
|
282
|
-
$select.parent().find('
|
287
|
+
$select.parent().find('span.caret').remove();
|
283
288
|
$select.parent().find('input').remove();
|
284
289
|
|
285
290
|
$select.unwrap();
|
@@ -337,7 +342,10 @@
|
|
337
342
|
if ( $select.is(':disabled') )
|
338
343
|
dropdownIcon.addClass('disabled');
|
339
344
|
|
340
|
-
|
345
|
+
// escape double quotes
|
346
|
+
var sanitizedLabelHtml = label.html().replace(/"/g, '"');
|
347
|
+
|
348
|
+
var $newSelect = $('<input type="text" class="select-dropdown" readonly="true" ' + (($select.is(':disabled')) ? 'disabled' : '') + ' data-activates="select-options-' + uniqueID +'" value="'+ sanitizedLabelHtml +'"/>');
|
341
349
|
$select.before($newSelect);
|
342
350
|
$newSelect.before(dropdownIcon);
|
343
351
|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
var currentElement = document.querySelector(selector);
|
28
28
|
if ( currentElement !== null) {
|
29
|
-
var elementOffset = currentElement.getBoundingClientRect().top +
|
29
|
+
var elementOffset = currentElement.getBoundingClientRect().top + window.pageYOffset;
|
30
30
|
|
31
31
|
if (windowScroll > (elementOffset + offset)) {
|
32
32
|
if (value.done !== true) {
|
@@ -19,17 +19,18 @@
|
|
19
19
|
}
|
20
20
|
|
21
21
|
// Add Touch Area
|
22
|
-
$('
|
22
|
+
var dragTarget = $('<div class="drag-target"></div>');
|
23
|
+
$('body').append(dragTarget);
|
23
24
|
|
24
25
|
if (options.edge == 'left') {
|
25
26
|
menu_id.css('left', -1 * (options.menuWidth + 10));
|
26
|
-
|
27
|
+
dragTarget.css({'left': 0}); // Add Touch Area
|
27
28
|
}
|
28
29
|
else {
|
29
30
|
menu_id.addClass('right-aligned') // Change text-alignment to right
|
30
31
|
.css('right', -1 * (options.menuWidth + 10))
|
31
32
|
.css('left', '');
|
32
|
-
|
33
|
+
dragTarget.css({'right': 0}); // Add Touch Area
|
33
34
|
}
|
34
35
|
|
35
36
|
// If fixed sidenav, bring menu out
|
@@ -82,7 +83,7 @@
|
|
82
83
|
} });
|
83
84
|
if (options.edge === 'left') {
|
84
85
|
// Reset phantom div
|
85
|
-
|
86
|
+
dragTarget.css({width: '', right: '', left: '0'});
|
86
87
|
menu_id.velocity(
|
87
88
|
{left: -1 * (options.menuWidth + 10)},
|
88
89
|
{ duration: 200,
|
@@ -100,7 +101,7 @@
|
|
100
101
|
}
|
101
102
|
else {
|
102
103
|
// Reset phantom div
|
103
|
-
|
104
|
+
dragTarget.css({width: '', right: '0', left: ''});
|
104
105
|
menu_id.velocity(
|
105
106
|
{right: -1 * (options.menuWidth + 10)},
|
106
107
|
{ duration: 200,
|
@@ -123,11 +124,11 @@
|
|
123
124
|
var panning = false;
|
124
125
|
var menuOut = false;
|
125
126
|
|
126
|
-
|
127
|
+
dragTarget.on('click', function(){
|
127
128
|
removeMenu();
|
128
129
|
});
|
129
130
|
|
130
|
-
|
131
|
+
dragTarget.hammer({
|
131
132
|
prevent_default: false
|
132
133
|
}).bind('pan', function(e) {
|
133
134
|
|
@@ -206,7 +207,7 @@
|
|
206
207
|
if ((menuOut && velocityX <= 0.3) || velocityX < -0.5) {
|
207
208
|
menu_id.velocity({left: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
208
209
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
209
|
-
|
210
|
+
dragTarget.css({width: '50%', right: 0, left: ''});
|
210
211
|
}
|
211
212
|
else if (!menuOut || velocityX > 0.3) {
|
212
213
|
// Enable Scrolling
|
@@ -217,14 +218,14 @@
|
|
217
218
|
complete: function () {
|
218
219
|
$(this).remove();
|
219
220
|
}});
|
220
|
-
|
221
|
+
dragTarget.css({width: '10px', right: '', left: 0});
|
221
222
|
}
|
222
223
|
}
|
223
224
|
else {
|
224
225
|
if ((menuOut && velocityX >= -0.3) || velocityX > 0.5) {
|
225
226
|
menu_id.velocity({right: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
226
227
|
$('#sidenav-overlay').velocity({opacity: 1 }, {duration: 50, queue: false, easing: 'easeOutQuad'});
|
227
|
-
|
228
|
+
dragTarget.css({width: '50%', right: '', left: 0});
|
228
229
|
}
|
229
230
|
else if (!menuOut || velocityX < -0.3) {
|
230
231
|
// Enable Scrolling
|
@@ -235,7 +236,7 @@
|
|
235
236
|
complete: function () {
|
236
237
|
$(this).remove();
|
237
238
|
}});
|
238
|
-
|
239
|
+
dragTarget.css({width: '10px', right: 0, left: ''});
|
239
240
|
}
|
240
241
|
}
|
241
242
|
|
@@ -252,13 +253,15 @@
|
|
252
253
|
|
253
254
|
// Disable Scrolling
|
254
255
|
$('body').css('overflow', 'hidden');
|
255
|
-
|
256
|
+
// Push current drag target on top of DOM tree
|
257
|
+
$('body').append(dragTarget);
|
258
|
+
|
256
259
|
if (options.edge === 'left') {
|
257
|
-
|
260
|
+
dragTarget.css({width: '50%', right: 0, left: ''});
|
258
261
|
menu_id.velocity({left: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
259
262
|
}
|
260
263
|
else {
|
261
|
-
|
264
|
+
dragTarget.css({width: '50%', right: '', left: 0});
|
262
265
|
menu_id.velocity({right: 0}, {duration: 300, queue: false, easing: 'easeOutQuad'});
|
263
266
|
menu_id.css('left','');
|
264
267
|
}
|
@@ -10,11 +10,6 @@
|
|
10
10
|
window_width = $(window).width();
|
11
11
|
|
12
12
|
$this.width('100%');
|
13
|
-
// Set Tab Width for each tab
|
14
|
-
var $num_tabs = $(this).children('li').length;
|
15
|
-
$this.children('li').each(function() {
|
16
|
-
$(this).width((100/$num_tabs)+'%');
|
17
|
-
});
|
18
13
|
var $active, $content, $links = $this.find('li.tab a'),
|
19
14
|
$tabs_width = $this.width(),
|
20
15
|
$tab_width = $this.find('li').first().outerWidth(),
|
@@ -36,10 +31,8 @@
|
|
36
31
|
if ($index < 0) {
|
37
32
|
$index = 0;
|
38
33
|
}
|
39
|
-
|
40
|
-
|
41
|
-
$content = $($active[0].hash);
|
42
|
-
}
|
34
|
+
|
35
|
+
$content = $($active[0].hash);
|
43
36
|
|
44
37
|
// append indicator then set indicator width to tab width
|
45
38
|
$this.append('<div class="indicator"></div>');
|
@@ -71,8 +71,19 @@ Materialize.toast = function (message, displayLength, className, completeCallbac
|
|
71
71
|
toast.classList.add(classes[i]);
|
72
72
|
}
|
73
73
|
}
|
74
|
-
|
75
|
-
|
74
|
+
// If type of parameter is HTML Element
|
75
|
+
if ( typeof HTMLElement === "object" ? html instanceof HTMLElement : html && typeof html === "object" && html !== null && html.nodeType === 1 && typeof html.nodeName==="string"
|
76
|
+
) {
|
77
|
+
toast.appendChild(html);
|
78
|
+
}
|
79
|
+
else if (html instanceof jQuery) {
|
80
|
+
// Check if it is jQuery object
|
81
|
+
toast.appendChild(html[0]);
|
82
|
+
}
|
83
|
+
else {
|
84
|
+
// Insert as text;
|
85
|
+
toast.innerHTML = html;
|
86
|
+
}
|
76
87
|
// Bind hammer
|
77
88
|
var hammerHandler = new Hammer(toast, {prevent_default: false});
|
78
89
|
hammerHandler.on('pan', function(e) {
|
@@ -10,153 +10,164 @@
|
|
10
10
|
var defaults = {
|
11
11
|
delay: 350
|
12
12
|
};
|
13
|
+
|
14
|
+
// Remove tooltip from the activator
|
15
|
+
if (options === "remove") {
|
16
|
+
this.each(function(){
|
17
|
+
$('#' + $(this).attr('data-tooltip-id')).remove();
|
18
|
+
});
|
19
|
+
return false;
|
20
|
+
}
|
21
|
+
|
13
22
|
options = $.extend(defaults, options);
|
14
23
|
|
15
|
-
//Remove previously created html
|
16
|
-
$('.material-tooltip').remove();
|
17
24
|
|
18
25
|
return this.each(function(){
|
26
|
+
var tooltipId = Materialize.guid();
|
19
27
|
var origin = $(this);
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
counter
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
66
|
-
});
|
67
|
-
tooltipVerticalMovement = '-10px';
|
68
|
-
backdrop.css({
|
69
|
-
borderRadius: '14px 14px 0 0',
|
70
|
-
transformOrigin: '50% 90%',
|
71
|
-
marginTop: tooltipHeight,
|
72
|
-
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
73
|
-
|
74
|
-
});
|
75
|
-
}
|
76
|
-
// Left Position
|
77
|
-
else if (tooltipPosition === "left") {
|
78
|
-
newTooltip.css({
|
79
|
-
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
80
|
-
left: origin.offset().left - tooltipWidth - margin
|
81
|
-
});
|
82
|
-
tooltipHorizontalMovement = '-10px';
|
83
|
-
backdrop.css({
|
84
|
-
width: '14px',
|
85
|
-
height: '14px',
|
86
|
-
borderRadius: '14px 0 0 14px',
|
87
|
-
transformOrigin: '95% 50%',
|
88
|
-
marginTop: tooltipHeight/2,
|
89
|
-
marginLeft: tooltipWidth
|
90
|
-
});
|
91
|
-
}
|
92
|
-
// Right Position
|
93
|
-
else if (tooltipPosition === "right") {
|
28
|
+
origin.attr('data-tooltip-id', tooltipId);
|
29
|
+
|
30
|
+
// Create Text span
|
31
|
+
var tooltip_text = $('<span></span>').text(origin.attr('data-tooltip'));
|
32
|
+
|
33
|
+
// Create tooltip
|
34
|
+
var newTooltip = $('<div></div>');
|
35
|
+
newTooltip.addClass('material-tooltip').append(tooltip_text)
|
36
|
+
.appendTo($('body'))
|
37
|
+
.attr('id', tooltipId);
|
38
|
+
|
39
|
+
var backdrop = $('<div></div>').addClass('backdrop');
|
40
|
+
backdrop.appendTo(newTooltip);
|
41
|
+
backdrop.css({ top: 0, left:0 });
|
42
|
+
|
43
|
+
|
44
|
+
//Destroy previously binded events
|
45
|
+
origin.off('mouseenter.tooltip mouseleave.tooltip');
|
46
|
+
// Mouse In
|
47
|
+
origin.on({
|
48
|
+
'mouseenter.tooltip': function(e) {
|
49
|
+
var tooltip_delay = origin.data("delay");
|
50
|
+
tooltip_delay = (tooltip_delay === undefined || tooltip_delay === '') ? options.delay : tooltip_delay;
|
51
|
+
counter = 0;
|
52
|
+
counterInterval = setInterval(function(){
|
53
|
+
counter += 10;
|
54
|
+
if (counter >= tooltip_delay && started === false) {
|
55
|
+
started = true;
|
56
|
+
newTooltip.css({ display: 'block', left: '0px', top: '0px' });
|
57
|
+
|
58
|
+
// Set Tooltip text
|
59
|
+
newTooltip.children('span').text(origin.attr('data-tooltip'));
|
60
|
+
|
61
|
+
// Tooltip positioning
|
62
|
+
var originWidth = origin.outerWidth();
|
63
|
+
var originHeight = origin.outerHeight();
|
64
|
+
var tooltipPosition = origin.attr('data-position');
|
65
|
+
var tooltipHeight = newTooltip.outerHeight();
|
66
|
+
var tooltipWidth = newTooltip.outerWidth();
|
67
|
+
var tooltipVerticalMovement = '0px';
|
68
|
+
var tooltipHorizontalMovement = '0px';
|
69
|
+
var scale_factor = 8;
|
70
|
+
|
71
|
+
if (tooltipPosition === "top") {
|
72
|
+
// Top Position
|
94
73
|
newTooltip.css({
|
95
|
-
top: origin.offset().top
|
96
|
-
left: origin.offset().left + originWidth + margin
|
97
|
-
});
|
98
|
-
tooltipHorizontalMovement = '+10px';
|
99
|
-
backdrop.css({
|
100
|
-
width: '14px',
|
101
|
-
height: '14px',
|
102
|
-
borderRadius: '0 14px 14px 0',
|
103
|
-
transformOrigin: '5% 50%',
|
104
|
-
marginTop: tooltipHeight/2,
|
105
|
-
marginLeft: '0px'
|
106
|
-
});
|
107
|
-
}
|
108
|
-
else {
|
109
|
-
// Bottom Position
|
110
|
-
newTooltip.css({
|
111
|
-
top: origin.offset().top + origin.outerHeight() + margin,
|
74
|
+
top: origin.offset().top - tooltipHeight - margin,
|
112
75
|
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
113
76
|
});
|
114
|
-
tooltipVerticalMovement = '
|
77
|
+
tooltipVerticalMovement = '-10px';
|
115
78
|
backdrop.css({
|
79
|
+
borderRadius: '14px 14px 0 0',
|
80
|
+
transformOrigin: '50% 90%',
|
81
|
+
marginTop: tooltipHeight,
|
116
82
|
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
83
|
+
|
117
84
|
});
|
118
|
-
|
85
|
+
}
|
86
|
+
// Left Position
|
87
|
+
else if (tooltipPosition === "left") {
|
88
|
+
newTooltip.css({
|
89
|
+
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
90
|
+
left: origin.offset().left - tooltipWidth - margin
|
91
|
+
});
|
92
|
+
tooltipHorizontalMovement = '-10px';
|
93
|
+
backdrop.css({
|
94
|
+
width: '14px',
|
95
|
+
height: '14px',
|
96
|
+
borderRadius: '14px 0 0 14px',
|
97
|
+
transformOrigin: '95% 50%',
|
98
|
+
marginTop: tooltipHeight/2,
|
99
|
+
marginLeft: tooltipWidth
|
100
|
+
});
|
101
|
+
}
|
102
|
+
// Right Position
|
103
|
+
else if (tooltipPosition === "right") {
|
104
|
+
newTooltip.css({
|
105
|
+
top: origin.offset().top + originHeight/2 - tooltipHeight/2,
|
106
|
+
left: origin.offset().left + originWidth + margin
|
107
|
+
});
|
108
|
+
tooltipHorizontalMovement = '+10px';
|
109
|
+
backdrop.css({
|
110
|
+
width: '14px',
|
111
|
+
height: '14px',
|
112
|
+
borderRadius: '0 14px 14px 0',
|
113
|
+
transformOrigin: '5% 50%',
|
114
|
+
marginTop: tooltipHeight/2,
|
115
|
+
marginLeft: '0px'
|
116
|
+
});
|
117
|
+
}
|
118
|
+
else {
|
119
|
+
// Bottom Position
|
120
|
+
newTooltip.css({
|
121
|
+
top: origin.offset().top + origin.outerHeight() + margin,
|
122
|
+
left: origin.offset().left + originWidth/2 - tooltipWidth/2
|
123
|
+
});
|
124
|
+
tooltipVerticalMovement = '+10px';
|
125
|
+
backdrop.css({
|
126
|
+
marginLeft: (tooltipWidth/2) - (backdrop.width()/2)
|
127
|
+
});
|
128
|
+
}
|
129
|
+
|
130
|
+
// Calculate Scale to fill
|
131
|
+
scale_factor = tooltipWidth / 8;
|
132
|
+
if (scale_factor < 8) {
|
133
|
+
scale_factor = 8;
|
134
|
+
}
|
135
|
+
if (tooltipPosition === "right" || tooltipPosition === "left") {
|
136
|
+
scale_factor = tooltipWidth / 10;
|
137
|
+
if (scale_factor < 6)
|
138
|
+
scale_factor = 6;
|
139
|
+
}
|
140
|
+
|
141
|
+
newTooltip.velocity({ marginTop: tooltipVerticalMovement, marginLeft: tooltipHorizontalMovement}, { duration: 350, queue: false })
|
142
|
+
.velocity({opacity: 1}, {duration: 300, delay: 50, queue: false});
|
143
|
+
backdrop.css({ display: 'block' })
|
144
|
+
.velocity({opacity:1},{duration: 55, delay: 0, queue: false})
|
145
|
+
.velocity({scale: scale_factor}, {duration: 300, delay: 0, queue: false, easing: 'easeInOutQuad'});
|
119
146
|
|
120
|
-
// Calculate Scale to fill
|
121
|
-
scale_factor = tooltipWidth / 8;
|
122
|
-
if (scale_factor < 8) {
|
123
|
-
scale_factor = 8;
|
124
|
-
}
|
125
|
-
if (tooltipPosition === "right" || tooltipPosition === "left") {
|
126
|
-
scale_factor = tooltipWidth / 10;
|
127
|
-
if (scale_factor < 6)
|
128
|
-
scale_factor = 6;
|
129
147
|
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
delay: 275, queue: false,
|
153
|
-
complete: function(){
|
154
|
-
backdrop.css('display', 'none');
|
155
|
-
newTooltip.css('display', 'none');
|
156
|
-
started = false;}
|
148
|
+
}, 10); // End Interval
|
149
|
+
|
150
|
+
// Mouse Out
|
151
|
+
},
|
152
|
+
'mouseleave.tooltip': function(){
|
153
|
+
// Reset State
|
154
|
+
clearInterval(counterInterval);
|
155
|
+
counter = 0;
|
156
|
+
|
157
|
+
// Animate back
|
158
|
+
newTooltip.velocity({
|
159
|
+
opacity: 0, marginTop: 0, marginLeft: 0}, { duration: 225, queue: false, delay: 225 }
|
160
|
+
);
|
161
|
+
backdrop.velocity({opacity: 0, scale: 1}, {
|
162
|
+
duration:225,
|
163
|
+
delay: 275, queue: false,
|
164
|
+
complete: function(){
|
165
|
+
backdrop.css('display', 'none');
|
166
|
+
newTooltip.css('display', 'none');
|
167
|
+
started = false;}
|
168
|
+
});
|
169
|
+
}
|
157
170
|
});
|
158
|
-
}
|
159
|
-
});
|
160
171
|
});
|
161
172
|
};
|
162
173
|
|