diff --git a/app/assets/javascripts/closet_hangers/index.js b/app/assets/javascripts/closet_hangers/index.js index c2e65ca8..556154f4 100644 --- a/app/assets/javascripts/closet_hangers/index.js +++ b/app/assets/javascripts/closet_hangers/index.js @@ -505,8 +505,6 @@ */ - $("input, textarea").placeholder(); - var itemsSearchForm = $("#closet-hangers-items-search[data-current-user-id]"); var itemsSearchField = itemsSearchForm.children("input[name=q]"); diff --git a/app/assets/javascripts/placeholder.js b/app/assets/javascripts/placeholder.js deleted file mode 100644 index f6ded977..00000000 --- a/app/assets/javascripts/placeholder.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! http://mths.be/placeholder v1.8.4 by @mathias */ -(function($){var e='placeholder' in document.createElement('input'),a='placeholder' in document.createElement('textarea');if(e&&a){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((e?'textarea':':input')+'[placeholder]').bind('focus.placeholder',b).bind('blur.placeholder',d).trigger('blur.placeholder').end()};$.fn.placeholder.input=e;$.fn.placeholder.textarea=a;$(function(){$('form').bind('submit.placeholder',function(){var f=$('.placeholder',this).each(b);setTimeout(function(){f.each(d)},10)})});$(window).bind('unload.placeholder',function(){$('.placeholder').val('')})}function c(g){var f={},h=/^jQuery\d+$/;$.each(g.attributes,function(k,j){if(j.specified&&!h.test(j.name)){f[j.name]=j.value}});return f}function b(){var f=$(this);if(f.val()===f.attr('placeholder')&&f.hasClass('placeholder')){if(f.data('placeholder-password')){f.hide().next().attr('id',f.removeAttr('id').data('placeholder-id')).show().focus()}else{f.val('').removeClass('placeholder')}}}function d(){var j,i=$(this),f=i,h=this.id;if(i.val()===''){if(i.is(':password')){if(!i.data('placeholder-textinput')){try{j=i.clone().attr({type:'text'})}catch(g){j=$('').attr($.extend(c(this),{type:'text'}))}j.removeAttr('name').data('placeholder-password',true).data('placeholder-id',h).bind('focus.placeholder',b);i.data('placeholder-textinput',j).data('placeholder-id',h).before(j)}i=i.removeAttr('id').hide().prev().attr('id',h).show()}i.addClass('placeholder').val(i.attr('placeholder'))}else{i.removeClass('placeholder')}}}(jQuery)); - diff --git a/app/views/closet_hangers/index.html.haml b/app/views/closet_hangers/index.html.haml index 52b27768..d90ef562 100644 --- a/app/views/closet_hangers/index.html.haml +++ b/app/views/closet_hangers/index.html.haml @@ -154,4 +154,4 @@ - content_for :javascripts do = include_javascript_libraries :jquery, :jquery_tmpl = javascript_include_tag 'ajax_auth', 'jquery.ui', 'jquery.jgrowl', - 'placeholder', 'stickUp.min', 'closet_hangers/index' \ No newline at end of file + 'stickUp.min', 'closet_hangers/index' \ No newline at end of file