mice 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +44 -36
- data/lib/mice/version.rb +1 -1
- metadata +2 -67
- data/vendor/assets/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +0 -414
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/ZeroClipboard.swf +0 -0
- data/vendor/assets/javascripts/mice/ZeroClipboard.js +0 -1031
- data/vendor/assets/javascripts/mice/ZeroClipboard.min.js +0 -9
- data/vendor/assets/javascripts/mice/alert.js +0 -92
- data/vendor/assets/javascripts/mice/carousel.js +0 -66
- data/vendor/assets/javascripts/mice/jquery.autocomplete.min.js +0 -29
- data/vendor/assets/javascripts/mice/jquery.autofix_anything.js +0 -83
- data/vendor/assets/javascripts/mice/jquery.email-autocomplete.js +0 -178
- data/vendor/assets/javascripts/mice/jquery.js +0 -9597
- data/vendor/assets/javascripts/mice/jquery.min.js +0 -5
- data/vendor/assets/javascripts/mice/jquery.min.map +0 -1
- data/vendor/assets/javascripts/mice/jquery.onepage-scroll.js +0 -411
- data/vendor/assets/javascripts/mice/message.coffee +0 -104
- data/vendor/assets/javascripts/mice/modal.coffee +0 -237
- data/vendor/assets/javascripts/mice/slider.coffee +0 -20
- data/vendor/assets/javascripts/mice/slider.js +0 -223
- data/vendor/assets/javascripts/mice/tooltip.coffee +0 -338
- data/vendor/assets/javascripts/mice/transition.coffee +0 -36
- data/vendor/assets/javascripts/mice.js +0 -6
- data/vendor/assets/stylesheets/mice/_alerts.scss +0 -70
- data/vendor/assets/stylesheets/mice/_autofix_anything.scss +0 -14
- data/vendor/assets/stylesheets/mice/_breadcrumbs.scss +0 -26
- data/vendor/assets/stylesheets/mice/_buttons.scss +0 -407
- data/vendor/assets/stylesheets/mice/_callouts.scss +0 -71
- data/vendor/assets/stylesheets/mice/_close.scss +0 -35
- data/vendor/assets/stylesheets/mice/_code.scss +0 -63
- data/vendor/assets/stylesheets/mice/_component-animations.scss +0 -11
- data/vendor/assets/stylesheets/mice/_forms.scss +0 -402
- data/vendor/assets/stylesheets/mice/_grid.scss +0 -95
- data/vendor/assets/stylesheets/mice/_icons.scss +0 -564
- data/vendor/assets/stylesheets/mice/_images.scss +0 -250
- data/vendor/assets/stylesheets/mice/_labels.scss +0 -82
- data/vendor/assets/stylesheets/mice/_lists.scss +0 -186
- data/vendor/assets/stylesheets/mice/_media.scss +0 -53
- data/vendor/assets/stylesheets/mice/_menu.scss +0 -42
- data/vendor/assets/stylesheets/mice/_message.scss +0 -78
- data/vendor/assets/stylesheets/mice/_mixins.scss +0 -176
- data/vendor/assets/stylesheets/mice/_modals.scss +0 -160
- data/vendor/assets/stylesheets/mice/_navbar.scss +0 -86
- data/vendor/assets/stylesheets/mice/_normalize.scss +0 -425
- data/vendor/assets/stylesheets/mice/_pagination.scss +0 -171
- data/vendor/assets/stylesheets/mice/_panels.scss +0 -236
- data/vendor/assets/stylesheets/mice/_progress.scss +0 -65
- data/vendor/assets/stylesheets/mice/_scaffolding.scss +0 -101
- data/vendor/assets/stylesheets/mice/_sidebar.scss +0 -37
- data/vendor/assets/stylesheets/mice/_slider.scss +0 -310
- data/vendor/assets/stylesheets/mice/_tables.scss +0 -144
- data/vendor/assets/stylesheets/mice/_tabs.scss +0 -70
- data/vendor/assets/stylesheets/mice/_timeline.scss +0 -157
- data/vendor/assets/stylesheets/mice/_tipsy.scss +0 -36
- data/vendor/assets/stylesheets/mice/_tooltips.scss +0 -124
- data/vendor/assets/stylesheets/mice/_typography.scss +0 -113
- data/vendor/assets/stylesheets/mice/_utilities.scss +0 -48
- data/vendor/assets/stylesheets/mice/_variables.scss +0 -577
- data/vendor/assets/stylesheets/mice-mobile.scss +0 -23
- data/vendor/assets/stylesheets/mice.scss +0 -46
- data/vendor/assets/stylesheets/mobile/bars.scss +0 -76
- data/vendor/assets/stylesheets/mobile/base.scss +0 -52
- data/vendor/assets/stylesheets/mobile/cards.scss +0 -29
- data/vendor/assets/stylesheets/mobile/variables.scss +0 -37
@@ -1,9 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* ZeroClipboard
|
3
|
-
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
|
4
|
-
* Copyright (c) 2014 Jon Rohan, James M. Greene
|
5
|
-
* Licensed MIT
|
6
|
-
* http://zeroclipboard.org/
|
7
|
-
* v1.3.5
|
8
|
-
*/
|
9
|
-
!function(a){"use strict";function b(a){return a.replace(/,/g,".").replace(/[^0-9\.]/g,"")}function c(a){return parseFloat(b(a))>=10}var d,e={bridge:null,version:"0.0.0",disabled:null,outdated:null,ready:null},f={},g=0,h={},i=0,j={},k=null,l=null,m=function(){var a,b,c,d,e="ZeroClipboard.swf";if(document.currentScript&&(d=document.currentScript.src));else{var f=document.getElementsByTagName("script");if("readyState"in f[0])for(a=f.length;a--&&("interactive"!==f[a].readyState||!(d=f[a].src)););else if("loading"===document.readyState)d=f[f.length-1].src;else{for(a=f.length;a--;){if(c=f[a].src,!c){b=null;break}if(c=c.split("#")[0].split("?")[0],c=c.slice(0,c.lastIndexOf("/")+1),null==b)b=c;else if(b!==c){b=null;break}}null!==b&&(d=b)}}return d&&(d=d.split("#")[0].split("?")[0],e=d.slice(0,d.lastIndexOf("/")+1)+e),e}(),n=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),o=function(b,c){var d,e,f;return a.getComputedStyle?d=a.getComputedStyle(b,null).getPropertyValue(c):(e=n(c),d=b.currentStyle?b.currentStyle[e]:b.style[e]),"cursor"!==c||d&&"auto"!==d||(f=b.tagName.toLowerCase(),"a"!==f)?d:"pointer"},p=function(b){b||(b=a.event);var c;this!==a?c=this:b.target?c=b.target:b.srcElement&&(c=b.srcElement),K.activate(c)},q=function(a,b,c){a&&1===a.nodeType&&(a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c))},r=function(a,b,c){a&&1===a.nodeType&&(a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c))},s=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)||a.classList.add(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},t=function(a,b){if(!a||1!==a.nodeType)return a;if(a.classList)return a.classList.contains(b)&&a.classList.remove(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},u=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(b/c*100)/100),d},v=function(b,c){var d={left:0,top:0,width:0,height:0,zIndex:B(c)-1};if(b.getBoundingClientRect){var e,f,g,h=b.getBoundingClientRect();"pageXOffset"in a&&"pageYOffset"in a?(e=a.pageXOffset,f=a.pageYOffset):(g=u(),e=Math.round(document.documentElement.scrollLeft/g),f=Math.round(document.documentElement.scrollTop/g));var i=document.documentElement.clientLeft||0,j=document.documentElement.clientTop||0;d.left=h.left+e-i,d.top=h.top+f-j,d.width="width"in h?h.width:h.right-h.left,d.height="height"in h?h.height:h.bottom-h.top}return d},w=function(a,b){var c=null==b||b&&b.cacheBust===!0&&b.useNoCache===!0;return c?(-1===a.indexOf("?")?"?":"&")+"noCache="+(new Date).getTime():""},x=function(b){var c,d,e,f=[],g=[],h=[];if(b.trustedOrigins&&("string"==typeof b.trustedOrigins?g.push(b.trustedOrigins):"object"==typeof b.trustedOrigins&&"length"in b.trustedOrigins&&(g=g.concat(b.trustedOrigins))),b.trustedDomains&&("string"==typeof b.trustedDomains?g.push(b.trustedDomains):"object"==typeof b.trustedDomains&&"length"in b.trustedDomains&&(g=g.concat(b.trustedDomains))),g.length)for(c=0,d=g.length;d>c;c++)if(g.hasOwnProperty(c)&&g[c]&&"string"==typeof g[c]){if(e=E(g[c]),!e)continue;if("*"===e){h=[e];break}h.push.apply(h,[e,"//"+e,a.location.protocol+"//"+e])}return h.length&&f.push("trustedOrigins="+encodeURIComponent(h.join(","))),"string"==typeof b.jsModuleId&&b.jsModuleId&&f.push("jsModuleId="+encodeURIComponent(b.jsModuleId)),f.join("&")},y=function(a,b,c){if("function"==typeof b.indexOf)return b.indexOf(a,c);var d,e=b.length;for("undefined"==typeof c?c=0:0>c&&(c=e+c),d=c;e>d;d++)if(b.hasOwnProperty(d)&&b[d]===a)return d;return-1},z=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},A=function(b,c,d,e){e?a.setTimeout(function(){b.apply(c,d)},0):b.apply(c,d)},B=function(a){var b,c;return a&&("number"==typeof a&&a>0?b=a:"string"==typeof a&&(c=parseInt(a,10))&&!isNaN(c)&&c>0&&(b=c)),b||("number"==typeof N.zIndex&&N.zIndex>0?b=N.zIndex:"string"==typeof N.zIndex&&(c=parseInt(N.zIndex,10))&&!isNaN(c)&&c>0&&(b=c)),b||0},C=function(a,b){if(a&&b!==!1&&"undefined"!=typeof console&&console&&(console.warn||console.log)){var c="`"+a+"` is deprecated. See docs for more info:\n https://github.com/zeroclipboard/zeroclipboard/blob/master/docs/instructions.md#deprecations";console.warn?console.warn(c):console.log(c)}},D=function(){var a,b,c,d,e,f,g=arguments[0]||{};for(a=1,b=arguments.length;b>a;a++)if(null!=(c=arguments[a]))for(d in c)if(c.hasOwnProperty(d)){if(e=g[d],f=c[d],g===f)continue;void 0!==f&&(g[d]=f)}return g},E=function(a){if(null==a||""===a)return null;if(a=a.replace(/^\s+|\s+$/g,""),""===a)return null;var b=a.indexOf("//");a=-1===b?a:a.slice(b+2);var c=a.indexOf("/");return a=-1===c?a:-1===b||0===c?null:a.slice(0,c),a&&".swf"===a.slice(-4).toLowerCase()?null:a||null},F=function(){var a=function(a,b){var c,d,e;if(null!=a&&"*"!==b[0]&&("string"==typeof a&&(a=[a]),"object"==typeof a&&"length"in a))for(c=0,d=a.length;d>c;c++)if(a.hasOwnProperty(c)&&(e=E(a[c]))){if("*"===e){b.length=0,b.push("*");break}-1===y(e,b)&&b.push(e)}},b={always:"always",samedomain:"sameDomain",never:"never"};return function(c,d){var e,f=d.allowScriptAccess;if("string"==typeof f&&(e=f.toLowerCase())&&/^always|samedomain|never$/.test(e))return b[e];var g=E(d.moviePath);null===g&&(g=c);var h=[];a(d.trustedOrigins,h),a(d.trustedDomains,h);var i=h.length;if(i>0){if(1===i&&"*"===h[0])return"always";if(-1!==y(c,h))return 1===i&&c===g?"sameDomain":"always"}return"never"}}(),G=function(a){if(null==a)return[];if(Object.keys)return Object.keys(a);var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},H=function(a){if(a)for(var b in a)a.hasOwnProperty(b)&&delete a[b];return a},I=function(){try{return document.activeElement}catch(a){}return null},J=function(){var a=!1;if("boolean"==typeof e.disabled)a=e.disabled===!1;else{if("function"==typeof ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a},K=function(a,b){return this instanceof K?(this.id=""+g++,h[this.id]={instance:this,elements:[],handlers:{}},a&&this.clip(a),"undefined"!=typeof b&&(C("new ZeroClipboard(elements, options)",N.debug),K.config(b)),this.options=K.config(),"boolean"!=typeof e.disabled&&(e.disabled=!J()),e.disabled===!1&&e.outdated!==!0&&null===e.bridge&&(e.outdated=!1,e.ready=!1,O()),void 0):new K(a,b)};K.prototype.setText=function(a){return a&&""!==a&&(f["text/plain"]=a,e.ready===!0&&e.bridge&&"function"==typeof e.bridge.setText?e.bridge.setText(a):e.ready=!1),this},K.prototype.setSize=function(a,b){return e.ready===!0&&e.bridge&&"function"==typeof e.bridge.setSize?e.bridge.setSize(a,b):e.ready=!1,this};var L=function(a){e.ready===!0&&e.bridge&&"function"==typeof e.bridge.setHandCursor?e.bridge.setHandCursor(a):e.ready=!1};K.prototype.destroy=function(){this.unclip(),this.off(),delete h[this.id]};var M=function(){var a,b,c,d=[],e=G(h);for(a=0,b=e.length;b>a;a++)c=h[e[a]].instance,c&&c instanceof K&&d.push(c);return d};K.version="1.3.5";var N={swfPath:m,trustedDomains:a.location.host?[a.location.host]:[],cacheBust:!0,forceHandCursor:!1,zIndex:999999999,debug:!0,title:null,autoActivate:!0};K.config=function(a){"object"==typeof a&&null!==a&&D(N,a);{if("string"!=typeof a||!a){var b={};for(var c in N)N.hasOwnProperty(c)&&(b[c]="object"==typeof N[c]&&null!==N[c]?"length"in N[c]?N[c].slice(0):D({},N[c]):N[c]);return b}if(N.hasOwnProperty(a))return N[a]}},K.destroy=function(){K.deactivate();for(var a in h)if(h.hasOwnProperty(a)&&h[a]){var b=h[a].instance;b&&"function"==typeof b.destroy&&b.destroy()}var c=P(e.bridge);c&&c.parentNode&&(c.parentNode.removeChild(c),e.ready=null,e.bridge=null)},K.activate=function(a){d&&(t(d,N.hoverClass),t(d,N.activeClass)),d=a,s(a,N.hoverClass),Q();var b=N.title||a.getAttribute("title");if(b){var c=P(e.bridge);c&&c.setAttribute("title",b)}var f=N.forceHandCursor===!0||"pointer"===o(a,"cursor");L(f)},K.deactivate=function(){var a=P(e.bridge);a&&(a.style.left="0px",a.style.top="-9999px",a.removeAttribute("title")),d&&(t(d,N.hoverClass),t(d,N.activeClass),d=null)};var O=function(){var b,c,d=document.getElementById("global-zeroclipboard-html-bridge");if(!d){var f=K.config();f.jsModuleId="string"==typeof k&&k||"string"==typeof l&&l||null;var g=F(a.location.host,N),h=x(f),i=N.moviePath+w(N.moviePath,N),j=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+i+'"/> <param name="allowScriptAccess" value="'+g+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+h+'"/> <embed src="'+i+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="'+g+'" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+h+'" scale="exactfit"> </embed> </object>';d=document.createElement("div"),d.id="global-zeroclipboard-html-bridge",d.setAttribute("class","global-zeroclipboard-container"),d.style.position="absolute",d.style.left="0px",d.style.top="-9999px",d.style.width="15px",d.style.height="15px",d.style.zIndex=""+B(N.zIndex),document.body.appendChild(d),d.innerHTML=j}b=document["global-zeroclipboard-flash-bridge"],b&&(c=b.length)&&(b=b[c-1]),e.bridge=b||d.children[0].lastElementChild},P=function(a){for(var b=/^OBJECT|EMBED$/,c=a&&a.parentNode;c&&b.test(c.nodeName)&&c.parentNode;)c=c.parentNode;return c||null},Q=function(){if(d){var a=v(d,N.zIndex),b=P(e.bridge);b&&(b.style.top=a.top+"px",b.style.left=a.left+"px",b.style.width=a.width+"px",b.style.height=a.height+"px",b.style.zIndex=a.zIndex+1),e.ready===!0&&e.bridge&&"function"==typeof e.bridge.setSize?e.bridge.setSize(a.width,a.height):e.ready=!1}return this};K.prototype.on=function(a,b){var c,d,f,g={},i=h[this.id]&&h[this.id].handlers;if("string"==typeof a&&a)f=a.toLowerCase().split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)a.hasOwnProperty(c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.on(c,a[c]);if(f&&f.length){for(c=0,d=f.length;d>c;c++)a=f[c].replace(/^on/,""),g[a]=!0,i[a]||(i[a]=[]),i[a].push(b);g.noflash&&e.disabled&&T.call(this,"noflash",{}),g.wrongflash&&e.outdated&&T.call(this,"wrongflash",{flashVersion:e.version}),g.load&&e.ready&&T.call(this,"load",{flashVersion:e.version})}return this},K.prototype.off=function(a,b){var c,d,e,f,g,i=h[this.id]&&h[this.id].handlers;if(0===arguments.length)f=G(i);else if("string"==typeof a&&a)f=a.split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)a.hasOwnProperty(c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.off(c,a[c]);if(f&&f.length)for(c=0,d=f.length;d>c;c++)if(a=f[c].toLowerCase().replace(/^on/,""),g=i[a],g&&g.length)if(b)for(e=y(b,g);-1!==e;)g.splice(e,1),e=y(b,g,e);else i[a].length=0;return this},K.prototype.handlers=function(a){var b,c=null,d=h[this.id]&&h[this.id].handlers;if(d){if("string"==typeof a&&a)return d[a]?d[a].slice(0):null;c={};for(b in d)d.hasOwnProperty(b)&&d[b]&&(c[b]=d[b].slice(0))}return c};var R=function(b,c,d,e){var f=h[this.id]&&h[this.id].handlers[b];if(f&&f.length){var g,i,j,k=c||this;for(g=0,i=f.length;i>g;g++)j=f[g],c=k,"string"==typeof j&&"function"==typeof a[j]&&(j=a[j]),"object"==typeof j&&j&&"function"==typeof j.handleEvent&&(c=j,j=j.handleEvent),"function"==typeof j&&A(j,c,d,e)}return this};K.prototype.clip=function(a){a=z(a);for(var b=0;b<a.length;b++)if(a.hasOwnProperty(b)&&a[b]&&1===a[b].nodeType){a[b].zcClippingId?-1===y(this.id,j[a[b].zcClippingId])&&j[a[b].zcClippingId].push(this.id):(a[b].zcClippingId="zcClippingId_"+i++,j[a[b].zcClippingId]=[this.id],N.autoActivate===!0&&q(a[b],"mouseover",p));var c=h[this.id].elements;-1===y(a[b],c)&&c.push(a[b])}return this},K.prototype.unclip=function(a){var b=h[this.id];if(b){var c,d=b.elements;a="undefined"==typeof a?d.slice(0):z(a);for(var e=a.length;e--;)if(a.hasOwnProperty(e)&&a[e]&&1===a[e].nodeType){for(c=0;-1!==(c=y(a[e],d,c));)d.splice(c,1);var f=j[a[e].zcClippingId];if(f){for(c=0;-1!==(c=y(this.id,f,c));)f.splice(c,1);0===f.length&&(N.autoActivate===!0&&r(a[e],"mouseover",p),delete a[e].zcClippingId)}}}return this},K.prototype.elements=function(){var a=h[this.id];return a&&a.elements?a.elements.slice(0):[]};var S=function(a){var b,c,d,e,f,g=[];if(a&&1===a.nodeType&&(b=a.zcClippingId)&&j.hasOwnProperty(b)&&(c=j[b],c&&c.length))for(d=0,e=c.length;e>d;d++)f=h[c[d]].instance,f&&f instanceof K&&g.push(f);return g};N.hoverClass="zeroclipboard-is-hover",N.activeClass="zeroclipboard-is-active",N.trustedOrigins=null,N.allowScriptAccess=null,N.useNoCache=!0,N.moviePath="ZeroClipboard.swf",K.detectFlashSupport=function(){return C("ZeroClipboard.detectFlashSupport",N.debug),J()},K.dispatch=function(a,b){if("string"==typeof a&&a){var c=a.toLowerCase().replace(/^on/,"");if(c)for(var e=d&&N.autoActivate===!0?S(d):M(),f=0,g=e.length;g>f;f++)T.call(e[f],c,b)}},K.prototype.setHandCursor=function(a){return C("ZeroClipboard.prototype.setHandCursor",N.debug),a="boolean"==typeof a?a:!!a,L(a),N.forceHandCursor=a,this},K.prototype.reposition=function(){return C("ZeroClipboard.prototype.reposition",N.debug),Q()},K.prototype.receiveEvent=function(a,b){if(C("ZeroClipboard.prototype.receiveEvent",N.debug),"string"==typeof a&&a){var c=a.toLowerCase().replace(/^on/,"");c&&T.call(this,c,b)}},K.prototype.setCurrent=function(a){return C("ZeroClipboard.prototype.setCurrent",N.debug),K.activate(a),this},K.prototype.resetBridge=function(){return C("ZeroClipboard.prototype.resetBridge",N.debug),K.deactivate(),this},K.prototype.setTitle=function(a){if(C("ZeroClipboard.prototype.setTitle",N.debug),a=a||N.title||d&&d.getAttribute("title")){var b=P(e.bridge);b&&b.setAttribute("title",a)}return this},K.setDefaults=function(a){C("ZeroClipboard.setDefaults",N.debug),K.config(a)},K.prototype.addEventListener=function(a,b){return C("ZeroClipboard.prototype.addEventListener",N.debug),this.on(a,b)},K.prototype.removeEventListener=function(a,b){return C("ZeroClipboard.prototype.removeEventListener",N.debug),this.off(a,b)},K.prototype.ready=function(){return C("ZeroClipboard.prototype.ready",N.debug),e.ready===!0};var T=function(a,g){a=a.toLowerCase().replace(/^on/,"");var h=g&&g.flashVersion&&b(g.flashVersion)||null,i=d,j=!0;switch(a){case"load":if(h){if(!c(h))return T.call(this,"onWrongFlash",{flashVersion:h}),void 0;e.outdated=!1,e.ready=!0,e.version=h}break;case"wrongflash":h&&!c(h)&&(e.outdated=!0,e.ready=!1,e.version=h);break;case"mouseover":s(i,N.hoverClass);break;case"mouseout":N.autoActivate===!0&&K.deactivate();break;case"mousedown":s(i,N.activeClass);break;case"mouseup":t(i,N.activeClass);break;case"datarequested":if(i){var k=i.getAttribute("data-clipboard-target"),l=k?document.getElementById(k):null;if(l){var m=l.value||l.textContent||l.innerText;m&&this.setText(m)}else{var n=i.getAttribute("data-clipboard-text");n&&this.setText(n)}}j=!1;break;case"complete":H(f),i&&i!==I()&&i.focus&&i.focus()}var o=i,p=[this,g];return R.call(this,a,o,p,j)};"function"==typeof define&&define.amd?define(["require","exports","module"],function(a,b,c){return k=c&&c.id||null,K}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports&&"function"==typeof a.require?(l=module.id||null,module.exports=K):a.ZeroClipboard=K}(function(){return this}());
|
@@ -1,92 +0,0 @@
|
|
1
|
-
/* ========================================================================
|
2
|
-
* Bootstrap: alert.js v3.2.0
|
3
|
-
* http://getbootstrap.com/javascript/#alerts
|
4
|
-
* ========================================================================
|
5
|
-
* Copyright 2011-2014 Twitter, Inc.
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
-
* ======================================================================== */
|
8
|
-
|
9
|
-
|
10
|
-
+function ($) {
|
11
|
-
'use strict';
|
12
|
-
|
13
|
-
// ALERT CLASS DEFINITION
|
14
|
-
// ======================
|
15
|
-
|
16
|
-
var dismiss = '[data-dismiss="alert"]'
|
17
|
-
var Alert = function (el) {
|
18
|
-
$(el).on('click', dismiss, this.close)
|
19
|
-
}
|
20
|
-
|
21
|
-
Alert.VERSION = '3.2.0'
|
22
|
-
|
23
|
-
Alert.prototype.close = function (e) {
|
24
|
-
var $this = $(this)
|
25
|
-
var selector = $this.attr('data-target')
|
26
|
-
|
27
|
-
if (!selector) {
|
28
|
-
selector = $this.attr('href')
|
29
|
-
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
30
|
-
}
|
31
|
-
|
32
|
-
var $parent = $(selector)
|
33
|
-
|
34
|
-
if (e) e.preventDefault()
|
35
|
-
|
36
|
-
if (!$parent.length) {
|
37
|
-
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
38
|
-
}
|
39
|
-
|
40
|
-
$parent.trigger(e = $.Event('close.bs.alert'))
|
41
|
-
|
42
|
-
if (e.isDefaultPrevented()) return
|
43
|
-
|
44
|
-
$parent.removeClass('in')
|
45
|
-
|
46
|
-
function removeElement() {
|
47
|
-
// detach from parent, fire event then clean up data
|
48
|
-
$parent.detach().trigger('closed.bs.alert').remove()
|
49
|
-
}
|
50
|
-
|
51
|
-
$.support.transition && $parent.hasClass('fade') ?
|
52
|
-
$parent
|
53
|
-
.one('bsTransitionEnd', removeElement)
|
54
|
-
.emulateTransitionEnd(150) :
|
55
|
-
removeElement()
|
56
|
-
}
|
57
|
-
|
58
|
-
|
59
|
-
// ALERT PLUGIN DEFINITION
|
60
|
-
// =======================
|
61
|
-
|
62
|
-
function Plugin(option) {
|
63
|
-
return this.each(function () {
|
64
|
-
var $this = $(this)
|
65
|
-
var data = $this.data('bs.alert')
|
66
|
-
|
67
|
-
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
68
|
-
if (typeof option == 'string') data[option].call($this)
|
69
|
-
})
|
70
|
-
}
|
71
|
-
|
72
|
-
var old = $.fn.alert
|
73
|
-
|
74
|
-
$.fn.alert = Plugin
|
75
|
-
$.fn.alert.Constructor = Alert
|
76
|
-
|
77
|
-
|
78
|
-
// ALERT NO CONFLICT
|
79
|
-
// =================
|
80
|
-
|
81
|
-
$.fn.alert.noConflict = function () {
|
82
|
-
$.fn.alert = old
|
83
|
-
return this
|
84
|
-
}
|
85
|
-
|
86
|
-
|
87
|
-
// ALERT DATA-API
|
88
|
-
// ==============
|
89
|
-
|
90
|
-
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
91
|
-
|
92
|
-
}(jQuery);
|
@@ -1,66 +0,0 @@
|
|
1
|
-
(function($){
|
2
|
-
"use strict";
|
3
|
-
|
4
|
-
$.fn.thumbcarousel = function(options){
|
5
|
-
var moveActiveToCenter = function(carousel){
|
6
|
-
if(carousel.active.size()){
|
7
|
-
|
8
|
-
var prevAllWidth = carousel.active.position().left,
|
9
|
-
nextAllWidth = carousel.overview.width() - carousel.active.position().left - carousel.active.outerWidth(),
|
10
|
-
centerOffset = (carousel.viewport.width() - carousel.thumbs.outerWidth()) / 2;
|
11
|
-
|
12
|
-
if( prevAllWidth <= centerOffset ){
|
13
|
-
carousel.overview.css('left', 0);
|
14
|
-
}else if( nextAllWidth <= centerOffset ){
|
15
|
-
carousel.overview.css('left', carousel.viewport.width() - carousel.overview.width());
|
16
|
-
}else{
|
17
|
-
carousel.overview.css('left', -Math.abs(centerOffset - prevAllWidth));
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
return this.each(function(){
|
23
|
-
var _this = $(this),
|
24
|
-
carousel = {
|
25
|
-
self: _this,
|
26
|
-
viewport: _this.find('.viewport'),
|
27
|
-
overview: _this.find('.overview'),
|
28
|
-
prev: _this.find('.control.prev'),
|
29
|
-
next: _this.find('.control.next'),
|
30
|
-
thumbs: _this.find('li'),
|
31
|
-
active: _this.find('li.active')
|
32
|
-
};
|
33
|
-
|
34
|
-
carousel.overview.width(carousel.thumbs.size() * carousel.thumbs.outerWidth());
|
35
|
-
|
36
|
-
carousel.self.on('click', '.control:not(.disable)', function(event) {
|
37
|
-
event.preventDefault();
|
38
|
-
var $control = $(this),
|
39
|
-
leftOffset = carousel.overview.position().left,
|
40
|
-
viewWidth = carousel.viewport.width();
|
41
|
-
if(carousel.overview.width() > viewWidth){
|
42
|
-
$control.addClass('disable');
|
43
|
-
|
44
|
-
if($control.hasClass('prev')){
|
45
|
-
carousel.overview.animate({ left: (viewWidth + leftOffset >= 0) ? 0 : (viewWidth + leftOffset) }, function(){
|
46
|
-
$control.removeClass('disable');
|
47
|
-
});
|
48
|
-
}else{
|
49
|
-
var _right = (carousel.overview.width() + leftOffset - viewWidth);
|
50
|
-
_right = _right < viewWidth ? (leftOffset -_right) : (leftOffset - viewWidth);
|
51
|
-
carousel.overview.animate({ left: (viewWidth + leftOffset <= 0) ? (carousel.viewport.width() - carousel.overview.width()) : _right }, function(){
|
52
|
-
$control.removeClass('disable');
|
53
|
-
});
|
54
|
-
}
|
55
|
-
}
|
56
|
-
});
|
57
|
-
|
58
|
-
moveActiveToCenter(carousel);
|
59
|
-
});
|
60
|
-
}
|
61
|
-
|
62
|
-
$(document).ready(function($) {
|
63
|
-
$('[data-toggle="thumb-carousel"]').thumbcarousel();
|
64
|
-
});
|
65
|
-
|
66
|
-
}(jQuery));
|
@@ -1,29 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Ajax Autocomplete for jQuery, version 1.2.9
|
3
|
-
* (c) 2013 Tomas Kirda
|
4
|
-
*
|
5
|
-
* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.
|
6
|
-
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
|
7
|
-
*
|
8
|
-
*/
|
9
|
-
(function(d){"function"===typeof define&&define.amd?define(["jquery"],d):d(jQuery)})(function(d){function g(a,b){var c=function(){},c={autoSelectFirst:!1,appendTo:"body",serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:g.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:c,onSearchComplete:c,onSearchError:c,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,
|
10
|
-
lookupFilter:function(a,b,c){return-1!==a.value.toLowerCase().indexOf(c)},paramName:"query",transformResult:function(a){return"string"===typeof a?d.parseJSON(a):a}};this.element=a;this.el=d(a);this.suggestions=[];this.badQueries=[];this.selectedIndex=-1;this.currentValue=this.element.value;this.intervalId=0;this.cachedResponse={};this.onChange=this.onChangeInterval=null;this.isLocal=!1;this.suggestionsContainer=null;this.options=d.extend({},c,b);this.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"};
|
11
|
-
this.hint=null;this.hintValue="";this.selection=null;this.initialize();this.setOptions(b)}var k=function(){return{escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(a){var b=document.createElement("div");b.className=a;b.style.position="absolute";b.style.display="none";return b}}}();g.utils=k;d.Autocomplete=g;g.formatResult=function(a,b){var c="("+k.escapeRegExChars(b)+")";return a.value.replace(RegExp(c,"gi"),"<strong>$1</strong>")};g.prototype=
|
12
|
-
{killerFn:null,initialize:function(){var a=this,b="."+a.classes.suggestion,c=a.classes.selected,e=a.options,f;a.element.setAttribute("autocomplete","off");a.killerFn=function(b){0===d(b.target).closest("."+a.options.containerClass).length&&(a.killSuggestions(),a.disableKillerFn())};a.suggestionsContainer=g.utils.createNode(e.containerClass);f=d(a.suggestionsContainer);f.appendTo(e.appendTo);"auto"!==e.width&&f.width(e.width);f.on("mouseover.autocomplete",b,function(){a.activate(d(this).data("index"))});
|
13
|
-
f.on("mouseout.autocomplete",function(){a.selectedIndex=-1;f.children("."+c).removeClass(c)});f.on("click.autocomplete",b,function(){a.select(d(this).data("index"))});a.fixPosition();a.fixPositionCapture=function(){a.visible&&a.fixPosition()};d(window).on("resize.autocomplete",a.fixPositionCapture);a.el.on("keydown.autocomplete",function(b){a.onKeyPress(b)});a.el.on("keyup.autocomplete",function(b){a.onKeyUp(b)});a.el.on("blur.autocomplete",function(){a.onBlur()});a.el.on("focus.autocomplete",function(){a.onFocus()});
|
14
|
-
a.el.on("change.autocomplete",function(b){a.onKeyUp(b)})},onFocus:function(){this.fixPosition();if(this.options.minChars<=this.el.val().length)this.onValueChange()},onBlur:function(){this.enableKillerFn()},setOptions:function(a){var b=this.options;d.extend(b,a);if(this.isLocal=d.isArray(b.lookup))b.lookup=this.verifySuggestionsFormat(b.lookup);d(this.suggestionsContainer).css({"max-height":b.maxHeight+"px",width:b.width+"px","z-index":b.zIndex})},clearCache:function(){this.cachedResponse={};this.badQueries=
|
15
|
-
[]},clear:function(){this.clearCache();this.currentValue="";this.suggestions=[]},disable:function(){this.disabled=!0;this.currentRequest&&this.currentRequest.abort()},enable:function(){this.disabled=!1},fixPosition:function(){var a;"body"===this.options.appendTo&&(a=this.el.offset(),a={top:a.top+this.el.outerHeight()+"px",left:a.left+"px"},"auto"===this.options.width&&(a.width=this.el.outerWidth()-2+"px"),d(this.suggestionsContainer).css(a))},enableKillerFn:function(){d(document).on("click.autocomplete",
|
16
|
-
this.killerFn)},disableKillerFn:function(){d(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var a=this;a.stopKillSuggestions();a.intervalId=window.setInterval(function(){a.hide();a.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var a=this.el.val().length,b=this.element.selectionStart;return"number"===typeof b?b===a:document.selection?(b=document.selection.createRange(),b.moveStart("character",
|
17
|
-
-a),a===b.text.length):!0},onKeyPress:function(a){if(!this.disabled&&!this.visible&&40===a.which&&this.currentValue)this.suggest();else if(!this.disabled&&this.visible){switch(a.which){case 27:this.el.val(this.currentValue);this.hide();break;case 39:if(this.hint&&this.options.onHint&&this.isCursorAtEnd()){this.selectHint();break}return;case 9:if(this.hint&&this.options.onHint){this.selectHint();return}case 13:if(-1===this.selectedIndex){this.hide();return}this.select(this.selectedIndex);if(9===a.which&&
|
18
|
-
!1===this.options.tabDisabled)return;break;case 38:this.moveUp();break;case 40:this.moveDown();break;default:return}a.stopImmediatePropagation();a.preventDefault()}},onKeyUp:function(a){var b=this;if(!b.disabled){switch(a.which){case 38:case 40:return}clearInterval(b.onChangeInterval);if(b.currentValue!==b.el.val())if(b.findBestHint(),0<b.options.deferRequestBy)b.onChangeInterval=setInterval(function(){b.onValueChange()},b.options.deferRequestBy);else b.onValueChange()}},onValueChange:function(){var a=
|
19
|
-
this.options,b=this.el.val(),c=this.getQuery(b);this.selection&&(this.selection=null,(a.onInvalidateSelection||d.noop).call(this.element));clearInterval(this.onChangeInterval);this.currentValue=b;this.selectedIndex=-1;if(a.triggerSelectOnValidInput&&(b=this.findSuggestionIndex(c),-1!==b)){this.select(b);return}c.length<a.minChars?this.hide():this.getSuggestions(c)},findSuggestionIndex:function(a){var b=-1,c=a.toLowerCase();d.each(this.suggestions,function(a,d){if(d.value.toLowerCase()===c)return b=
|
20
|
-
a,!1});return b},getQuery:function(a){var b=this.options.delimiter;if(!b)return a;a=a.split(b);return d.trim(a[a.length-1])},getSuggestionsLocal:function(a){var b=this.options,c=a.toLowerCase(),e=b.lookupFilter,f=parseInt(b.lookupLimit,10),b={suggestions:d.grep(b.lookup,function(b){return e(b,a,c)})};f&&b.suggestions.length>f&&(b.suggestions=b.suggestions.slice(0,f));return b},getSuggestions:function(a){var b,c=this,e=c.options,f=e.serviceUrl,l,g;e.params[e.paramName]=a;l=e.ignoreParams?null:e.params;
|
21
|
-
c.isLocal?b=c.getSuggestionsLocal(a):(d.isFunction(f)&&(f=f.call(c.element,a)),g=f+"?"+d.param(l||{}),b=c.cachedResponse[g]);b&&d.isArray(b.suggestions)?(c.suggestions=b.suggestions,c.suggest()):c.isBadQuery(a)||!1===e.onSearchStart.call(c.element,e.params)||(c.currentRequest&&c.currentRequest.abort(),c.currentRequest=d.ajax({url:f,data:l,type:e.type,dataType:e.dataType}).done(function(b){c.currentRequest=null;c.processResponse(b,a,g);e.onSearchComplete.call(c.element,a)}).fail(function(b,d,f){e.onSearchError.call(c.element,
|
22
|
-
a,b,d,f)}))},isBadQuery:function(a){for(var b=this.badQueries,c=b.length;c--;)if(0===a.indexOf(b[c]))return!0;return!1},hide:function(){this.visible=!1;this.selectedIndex=-1;d(this.suggestionsContainer).hide();this.signalHint(null)},suggest:function(){if(0===this.suggestions.length)this.hide();else{var a=this.options,b=a.formatResult,c=this.getQuery(this.currentValue),e=this.classes.suggestion,f=this.classes.selected,g=d(this.suggestionsContainer),k=a.beforeRender,m="",h;if(a.triggerSelectOnValidInput&&
|
23
|
-
(h=this.findSuggestionIndex(c),-1!==h)){this.select(h);return}d.each(this.suggestions,function(a,d){m+='<div class="'+e+'" data-index="'+a+'">'+b(d,c)+"</div>"});"auto"===a.width&&(h=this.el.outerWidth()-2,g.width(0<h?h:300));g.html(m);a.autoSelectFirst&&(this.selectedIndex=0,g.children().first().addClass(f));d.isFunction(k)&&k.call(this.element,g);g.show();this.visible=!0;this.findBestHint()}},findBestHint:function(){var a=this.el.val().toLowerCase(),b=null;a&&(d.each(this.suggestions,function(c,
|
24
|
-
d){var f=0===d.value.toLowerCase().indexOf(a);f&&(b=d);return!f}),this.signalHint(b))},signalHint:function(a){var b="";a&&(b=this.currentValue+a.value.substr(this.currentValue.length));this.hintValue!==b&&(this.hintValue=b,this.hint=a,(this.options.onHint||d.noop)(b))},verifySuggestionsFormat:function(a){return a.length&&"string"===typeof a[0]?d.map(a,function(a){return{value:a,data:null}}):a},processResponse:function(a,b,c){var d=this.options;a=d.transformResult(a,b);a.suggestions=this.verifySuggestionsFormat(a.suggestions);
|
25
|
-
d.noCache||(this.cachedResponse[c]=a,0===a.suggestions.length&&this.badQueries.push(c));b===this.getQuery(this.currentValue)&&(this.suggestions=a.suggestions,this.suggest())},activate:function(a){var b=this.classes.selected,c=d(this.suggestionsContainer),e=c.children();c.children("."+b).removeClass(b);this.selectedIndex=a;return-1!==this.selectedIndex&&e.length>this.selectedIndex?(a=e.get(this.selectedIndex),d(a).addClass(b),a):null},selectHint:function(){var a=d.inArray(this.hint,this.suggestions);
|
26
|
-
this.select(a)},select:function(a){this.hide();this.onSelect(a)},moveUp:function(){-1!==this.selectedIndex&&(0===this.selectedIndex?(d(this.suggestionsContainer).children().first().removeClass(this.classes.selected),this.selectedIndex=-1,this.el.val(this.currentValue),this.findBestHint()):this.adjustScroll(this.selectedIndex-1))},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(a){var b=this.activate(a),c,e;b&&(b=b.offsetTop,
|
27
|
-
c=d(this.suggestionsContainer).scrollTop(),e=c+this.options.maxHeight-25,b<c?d(this.suggestionsContainer).scrollTop(b):b>e&&d(this.suggestionsContainer).scrollTop(b-this.options.maxHeight+25),this.el.val(this.getValue(this.suggestions[a].value)),this.signalHint(null))},onSelect:function(a){var b=this.options.onSelect;a=this.suggestions[a];this.currentValue=this.getValue(a.value);this.el.val(this.currentValue);this.signalHint(null);this.suggestions=[];this.selection=a;d.isFunction(b)&&b.call(this.element,
|
28
|
-
a)},getValue:function(a){var b=this.options.delimiter,c;if(!b)return a;c=this.currentValue;b=c.split(b);return 1===b.length?a:c.substr(0,c.length-b[b.length-1].length)+a},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete");this.disableKillerFn();d(window).off("resize.autocomplete",this.fixPositionCapture);d(this.suggestionsContainer).remove()}};d.fn.autocomplete=function(a,b){return 0===arguments.length?this.first().data("autocomplete"):this.each(function(){var c=d(this),e=
|
29
|
-
c.data("autocomplete");if("string"===typeof a){if(e&&"function"===typeof e[a])e[a](b)}else e&&e.dispose&&e.dispose(),e=new g(this,a),c.data("autocomplete",e)})}});
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/* ===========================================================
|
2
|
-
* jquery.autofix_anything.js v1
|
3
|
-
* ===========================================================
|
4
|
-
* Copyright 2013 Pete Rojwongsuriya.
|
5
|
-
* http://www.thepetedesign.com
|
6
|
-
*
|
7
|
-
* Fix position of anything on your website automatically
|
8
|
-
* with one js call
|
9
|
-
*
|
10
|
-
* https://github.com/peachananr/autofix_anything
|
11
|
-
*
|
12
|
-
* ========================================================== */
|
13
|
-
|
14
|
-
!function($){
|
15
|
-
|
16
|
-
var defaults = {
|
17
|
-
customOffset: false,
|
18
|
-
manual: false,
|
19
|
-
onlyInContainer: true
|
20
|
-
};
|
21
|
-
|
22
|
-
$.fn.autofix_anything = function(options){
|
23
|
-
var settings = $.extend({}, defaults, options),
|
24
|
-
el = $(this),
|
25
|
-
curpos = el.position(),
|
26
|
-
offset = settings.customOffset,
|
27
|
-
pos = el.offset();
|
28
|
-
|
29
|
-
el.addClass("autofix_sb")
|
30
|
-
|
31
|
-
$.fn.manualfix = function() {
|
32
|
-
var el = $(this),
|
33
|
-
pos = el.offset();
|
34
|
-
if (el.hasClass("fixed")) {
|
35
|
-
el.removeClass("fixed")
|
36
|
-
} else {
|
37
|
-
el.addClass("fixed").css({
|
38
|
-
top: 0,
|
39
|
-
left: pos.left,
|
40
|
-
right: "auto",
|
41
|
-
bottom: "auto"
|
42
|
-
});
|
43
|
-
}
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
fixAll = function(el, settings, curpos, pos){
|
48
|
-
if (settings.customOffset == false) offset = el.parent().offset().top
|
49
|
-
if($(document).scrollTop() > offset && $(document).scrollTop() <= (el.parent().height() + (offset - $(window).height()))) {
|
50
|
-
el.removeClass("bottom").addClass("fixed").css({
|
51
|
-
top: 0,
|
52
|
-
left: pos.left,
|
53
|
-
right: "auto",
|
54
|
-
bottom: "auto"
|
55
|
-
});
|
56
|
-
} else {
|
57
|
-
if($(document).scrollTop() > offset) {
|
58
|
-
if (settings.onlyInContainer == true ) {
|
59
|
-
if($(document).scrollTop() > (el.parent().height() - $(window).height())) {
|
60
|
-
el.addClass("bottom fixed").removeAttr( 'style' ).css({
|
61
|
-
left: curpos.left
|
62
|
-
});
|
63
|
-
}else {
|
64
|
-
el.removeClass("bottom fixed").removeAttr( 'style' );
|
65
|
-
|
66
|
-
}
|
67
|
-
}
|
68
|
-
} else {
|
69
|
-
el.removeClass("bottom fixed").removeAttr( 'style' );
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
}
|
74
|
-
if (settings.manual == false) {
|
75
|
-
$(window).scroll(function() {
|
76
|
-
fixAll(el, settings, curpos, pos)
|
77
|
-
});
|
78
|
-
}
|
79
|
-
|
80
|
-
|
81
|
-
}
|
82
|
-
}(window.jQuery);
|
83
|
-
|
@@ -1,178 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* jQuery Email Autocomplete - v0.0.2
|
3
|
-
* A jQuery plugin that suggests and autocompletes the domain in email fields.
|
4
|
-
*
|
5
|
-
*
|
6
|
-
* Made by Low Yong Zhen <cephyz@gmail.com>
|
7
|
-
* Under MIT License < http://yzlow.mit-license.org>
|
8
|
-
*/
|
9
|
-
"use strict";
|
10
|
-
|
11
|
-
(function ($, window, document, undefined) {
|
12
|
-
|
13
|
-
var pluginName = "emailautocomplete";
|
14
|
-
var defaults = {
|
15
|
-
suggClass: "eac-sugg",
|
16
|
-
domains: ["yahoo.com" ,"google.com" ,"hotmail.com" ,"gmail.com" ,"me.com" ,"aol.com" ,"mac.com" ,"live.com" ,"comcast.net" ,"googlemail.com" ,"msn.com" ,"hotmail.co.uk" ,"yahoo.co.uk" ,"facebook.com" ,"verizon.net" ,"sbcglobal.net" ,"att.net" ,"gmx.com" ,"mail.com" ,"outlook.com" ,"icloud.com"]
|
17
|
-
};
|
18
|
-
|
19
|
-
function Plugin(elem, options) {
|
20
|
-
this.$field = $(elem);
|
21
|
-
this.options = $.extend(true, {}, defaults, options); //we want deep extend
|
22
|
-
this._defaults = defaults;
|
23
|
-
this._domains = this.options.domains;
|
24
|
-
this.init();
|
25
|
-
}
|
26
|
-
|
27
|
-
Plugin.prototype = {
|
28
|
-
init: function () {
|
29
|
-
|
30
|
-
//shim indexOf
|
31
|
-
if (!Array.prototype.indexOf) {
|
32
|
-
this.doIndexOf();
|
33
|
-
}
|
34
|
-
|
35
|
-
//bind handlers
|
36
|
-
this.$field.on("keyup.eac", $.proxy(this.displaySuggestion, this));
|
37
|
-
|
38
|
-
this.$field.on("blur.eac", $.proxy(this.autocomplete, this));
|
39
|
-
|
40
|
-
//get input padding,border and margin to offset text
|
41
|
-
this.fieldLeftOffset = (this.$field.outerWidth(true) - this.$field.width()) / 2;
|
42
|
-
|
43
|
-
//wrap our field
|
44
|
-
var $wrap = $("<div class='eac-input-wrap' />").css({
|
45
|
-
display: this.$field.css("display"),
|
46
|
-
position: "relative",
|
47
|
-
fontSize: this.$field.css("fontSize")
|
48
|
-
});
|
49
|
-
this.$field.wrap($wrap);
|
50
|
-
|
51
|
-
//create container to test width of current val
|
52
|
-
this.$cval = $("<span class='eac-cval' />").css({
|
53
|
-
visibility: "hidden",
|
54
|
-
position: "absolute",
|
55
|
-
display: "inline-block",
|
56
|
-
fontFamily: this.$field.css("fontFamily"),
|
57
|
-
fontWeight: this.$field.css("fontWeight"),
|
58
|
-
letterSpacing: this.$field.css("letterSpacing")
|
59
|
-
}).insertAfter(this.$field);
|
60
|
-
|
61
|
-
//create the suggestion overlay
|
62
|
-
/* touchstart jquery 1.7+ */
|
63
|
-
var heightPad = (this.$field.outerHeight(true) - this.$field.height()) / 2; //padding+border
|
64
|
-
this.$suggOverlay = $("<span class='"+this.options.suggClass+"' />").css({
|
65
|
-
display: "block",
|
66
|
-
"box-sizing": "content-box", //standardize
|
67
|
-
lineHeight: this.$field.css('lineHeight'),
|
68
|
-
paddingTop: heightPad + "px",
|
69
|
-
paddingBottom: heightPad + "px",
|
70
|
-
fontFamily: this.$field.css("fontFamily"),
|
71
|
-
fontWeight: this.$field.css("fontWeight"),
|
72
|
-
letterSpacing: this.$field.css("letterSpacing"),
|
73
|
-
position: "absolute",
|
74
|
-
top: 0,
|
75
|
-
left: 0
|
76
|
-
}).insertAfter(this.$field).on("mousedown.eac touchstart.eac", $.proxy(this.autocomplete, this));
|
77
|
-
|
78
|
-
},
|
79
|
-
|
80
|
-
suggest: function (str) {
|
81
|
-
var str_arr = str.split("@");
|
82
|
-
if (str_arr.length > 1) {
|
83
|
-
str = str_arr.pop();
|
84
|
-
if (!str.length) {
|
85
|
-
return "";
|
86
|
-
}
|
87
|
-
} else {
|
88
|
-
return "";
|
89
|
-
}
|
90
|
-
|
91
|
-
var match = this._domains.filter(function (domain) {
|
92
|
-
return 0 === domain.indexOf(str);
|
93
|
-
}).shift() || "";
|
94
|
-
|
95
|
-
return match.replace(str, "");
|
96
|
-
},
|
97
|
-
|
98
|
-
autocomplete: function () {
|
99
|
-
if(typeof this.suggestion === "undefined"){
|
100
|
-
return false;
|
101
|
-
}
|
102
|
-
this.$field.val(this.val + this.suggestion);
|
103
|
-
this.$suggOverlay.html("");
|
104
|
-
this.$cval.html("");
|
105
|
-
},
|
106
|
-
|
107
|
-
/**
|
108
|
-
* Displays the suggestion, handler for field keyup event
|
109
|
-
*/
|
110
|
-
displaySuggestion: function (e) {
|
111
|
-
this.val = this.$field.val();
|
112
|
-
this.suggestion = this.suggest(this.val);
|
113
|
-
|
114
|
-
if (!this.suggestion.length) {
|
115
|
-
this.$suggOverlay.html("");
|
116
|
-
} else {
|
117
|
-
e.preventDefault();
|
118
|
-
}
|
119
|
-
|
120
|
-
//update with new suggestion
|
121
|
-
this.$suggOverlay.html(this.suggestion);
|
122
|
-
this.$cval.html(this.val);
|
123
|
-
|
124
|
-
//find width of current input val so we can offset the suggestion text
|
125
|
-
var cvalWidth = this.$cval.width();
|
126
|
-
|
127
|
-
if(this.$field.outerWidth() > cvalWidth){
|
128
|
-
//offset our suggestion container
|
129
|
-
this.$suggOverlay.css('left', this.fieldLeftOffset + cvalWidth + "px");
|
130
|
-
}
|
131
|
-
},
|
132
|
-
|
133
|
-
/**
|
134
|
-
* indexof polyfill
|
135
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf#Polyfill
|
136
|
-
*/
|
137
|
-
doIndexOf: function(){
|
138
|
-
|
139
|
-
Array.prototype.indexOf = function (searchElement, fromIndex) {
|
140
|
-
if ( this === undefined || this === null ) {
|
141
|
-
throw new TypeError( '"this" is null or not defined' );
|
142
|
-
}
|
143
|
-
|
144
|
-
var length = this.length >>> 0; // Hack to convert object.length to a UInt32
|
145
|
-
|
146
|
-
fromIndex = +fromIndex || 0;
|
147
|
-
|
148
|
-
if (Math.abs(fromIndex) === Infinity) {
|
149
|
-
fromIndex = 0;
|
150
|
-
}
|
151
|
-
|
152
|
-
if (fromIndex < 0) {
|
153
|
-
fromIndex += length;
|
154
|
-
if (fromIndex < 0) {
|
155
|
-
fromIndex = 0;
|
156
|
-
}
|
157
|
-
}
|
158
|
-
|
159
|
-
for (;fromIndex < length; fromIndex++) {
|
160
|
-
if (this[fromIndex] === searchElement) {
|
161
|
-
return fromIndex;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
|
165
|
-
return -1;
|
166
|
-
};
|
167
|
-
}
|
168
|
-
};
|
169
|
-
|
170
|
-
$.fn[pluginName] = function (options) {
|
171
|
-
return this.each(function () {
|
172
|
-
if (!$.data(this, "yz_" + pluginName)) {
|
173
|
-
$.data(this, "yz_" + pluginName, new Plugin(this, options));
|
174
|
-
}
|
175
|
-
});
|
176
|
-
};
|
177
|
-
|
178
|
-
})(jQuery, window, document);
|