8889841cplaceholders.js.LICENSE.txt000064400000002167150515345350011462 0ustar00/*! * The MIT License * * Copyright (c) 2012 James Allardice * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ placeholders.js000064400000007534150515345350007566 0ustar00/*! For license information please see placeholders.js.LICENSE.txt */ ({6315:function(){!function(t){"use strict";var e=void 0!==document.createElement("input").placeholder;if(t.Placeholders={nativeSupport:e,disable:e?B:C,enable:e?B:function(t){j(t,D)}},!e){var r,n=["text","search","url","tel","email","password","number","textarea"],a=[27,33,34,35,36,37,38,39,40,8,46],u=new RegExp("(?:^|\\s)placeholdersjs(?!\\S)"),l="data-placeholder-value",i="data-placeholder-active",o="data-placeholder-type",c="data-placeholder-submit",s="data-placeholder-bound",d="data-placeholder-maxlength",g=document.getElementsByTagName("head")[0],b=document.documentElement,f=t.Placeholders,v=document.getElementsByTagName("input"),p=document.getElementsByTagName("textarea"),h="false"===b.getAttribute("data-placeholder-focus"),m="false"!==b.getAttribute("data-placeholder-live"),A=document.createElement("style");A.type="text/css";var y,x,E=document.createTextNode(".placeholdersjs {color:#ccc;}");A.styleSheet?A.styleSheet.cssText=E.nodeValue:A.appendChild(E),g.insertBefore(A,g.firstChild);for(var N=0,T=v.length+p.length;N=0&&(t.setAttribute("maxLength",a),t.removeAttribute(d));var c=t.getAttribute(o);return c&&(t.type=c),!0}return!1}function D(t){var e=t.getAttribute(l);return!(""!==t.value||!e||(t.setAttribute(i,"true"),t.value=e,t.className+=" placeholdersjs",t.getAttribute(d)||(t.setAttribute(d,t.maxLength),t.removeAttribute("maxLength")),t.getAttribute(o)?t.type="text":"password"===t.type&&R(t,"text")&&t.setAttribute(o,"password"),0))}function P(t){var e=t.form;e&&"string"==typeof e&&((e=document.getElementById(e)).getAttribute(c)||(k(e,"submit",function(t){return function(){C(t)}}(e)),e.setAttribute(c,"true"))),k(t,"focus",function(t){return function(){h&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)?I(t,0):V(t)}}(t)),k(t,"blur",function(t){return function(){D(t)}}(t)),h&&(k(t,"keydown",function(t){return function(e){if(r=t.value,"true"===t.getAttribute(i)&&r===t.getAttribute(l)&&L(a,e.keyCode))return e.preventDefault&&e.preventDefault(),!1}}(t)),k(t,"keyup",function(t){return function(){V(t,r),""===t.value&&(t.blur(),I(t,0))}}(t)),k(t,"click",function(t){return function(){t===S()&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)&&I(t,0)}}(t))),t.setAttribute(s,"true"),t.setAttribute(l,y),(h||t!==S())&&D(t)}}(this)}})[6315]();