diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-05-18 15:49:08 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-05-23 11:22:07 +0100 |
commit | 875836e662f33bb4c5a9f9093bb8080f214dea5b (patch) | |
tree | 3bbf01c13e0c8ec8dccc72356ba36b9b0b9e2bf3 /web/js/jquery.placeholder.min.js | |
parent | 755bc0e550ed9b0cb58211366c4bf5fd0ca9f872 (diff) |
Move third party libraries into vendor directories
This makes the git hook that lints our own JavaScript easier,
and keeps things more cleanly separated.
We also remove unused third party libraries (select2 and
jquery.placeholder).
Diffstat (limited to 'web/js/jquery.placeholder.min.js')
-rw-r--r-- | web/js/jquery.placeholder.min.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/web/js/jquery.placeholder.min.js b/web/js/jquery.placeholder.min.js deleted file mode 100644 index 122277a31..000000000 --- a/web/js/jquery.placeholder.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! http://mths.be/placeholder v2.0.5 by @mathias */ -;(function(f,h,$){var a='placeholder' in h.createElement('input'),d='placeholder' in h.createElement('textarea'),i=$.fn,c=$.valHooks,k,j;if(a&&d){j=i.placeholder=function(){return this};j.input=j.textarea=true}else{j=i.placeholder=function(){var l=this;l.filter((a?'textarea':':input')+'[placeholder]').not('.placeholder').bind({'focus.placeholder':b,'blur.placeholder':e}).data('placeholder-enabled',true).trigger('blur.placeholder');return l};j.input=a;j.textarea=d;k={get:function(m){var l=$(m);return l.data('placeholder-enabled')&&l.hasClass('placeholder')?'':m.value},set:function(m,n){var l=$(m);if(!l.data('placeholder-enabled')){return m.value=n}if(n==''){m.value=n;if(m!=h.activeElement){e.call(m)}}else{if(l.hasClass('placeholder')){b.call(m,true,n)||(m.value=n)}else{m.value=n}}return l}};a||(c.input=k);d||(c.textarea=k);$(function(){$(h).delegate('form','submit.placeholder',function(){var l=$('.placeholder',this).each(b);setTimeout(function(){l.each(e)},10)})});$(f).bind('beforeunload.placeholder',function(){$('.placeholder').each(function(){this.value=''})})}function g(m){var l={},n=/^jQuery\d+$/;$.each(m.attributes,function(p,o){if(o.specified&&!n.test(o.name)){l[o.name]=o.value}});return l}function b(m,n){var l=this,o=$(l);if(l.value==o.attr('placeholder')&&o.hasClass('placeholder')){if(o.data('placeholder-password')){o=o.hide().next().show().attr('id',o.removeAttr('id').data('placeholder-id'));if(m===true){return o[0].value=n}o.focus()}else{l.value='';o.removeClass('placeholder')}}}function e(){var q,l=this,p=$(l),m=p,o=this.id;if(l.value==''){if(l.type=='password'){if(!p.data('placeholder-textinput')){try{q=p.clone().attr({type:'text'})}catch(n){q=$('<input>').attr($.extend(g(this),{type:'text'}))}q.removeAttr('name').data({'placeholder-password':true,'placeholder-id':o}).bind('focus.placeholder',b);p.data({'placeholder-textinput':q,'placeholder-id':o}).before(q)}p=p.removeAttr('id').hide().prev().attr('id',o).show()}p.addClass('placeholder');p[0].value=p.attr('placeholder')}else{p.removeClass('placeholder')}}}(this,document,jQuery));
\ No newline at end of file |