diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-12-04 13:30:13 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-12-04 13:30:13 +0100 |
commit | 3e519945c3d3ceeafb6ca302f8cf720943d397a9 (patch) | |
tree | 4aa2b1d121a6fd57e90ce3ab49ae8e2eb5dffe9d /core/js/jquery.infieldlabel.min.js | |
parent | a53a946c20031e891e781b38cfd0fcb849db3cb1 (diff) | |
download | nextcloud-server-3e519945c3d3ceeafb6ca302f8cf720943d397a9.tar.gz nextcloud-server-3e519945c3d3ceeafb6ca302f8cf720943d397a9.zip |
replace minified infieldlabel with dcneiners version
Diffstat (limited to 'core/js/jquery.infieldlabel.min.js')
-rw-r--r-- | core/js/jquery.infieldlabel.min.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/core/js/jquery.infieldlabel.min.js b/core/js/jquery.infieldlabel.min.js deleted file mode 100644 index 36f6b8f1271..00000000000 --- a/core/js/jquery.infieldlabel.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - In-Field Label jQuery Plugin - http://fuelyourcoding.com/scripts/infield.html - - Copyright (c) 2009-2010 Doug Neiner - Dual licensed under the MIT and GPL licenses. - Uses the same license as jQuery, see: - http://docs.jquery.com/License - - @version 0.1.5 -*/ -(function($){$.InFieldLabels=function(label,field,options){var base=this;base.$label=$(label);base.label=label;base.$field=$(field);base.field=field;base.$label.data("InFieldLabels",base);base.showing=true;base.init=function(){base.options=$.extend({},$.InFieldLabels.defaultOptions,options);setTimeout(function(){if(base.$field.val()!==""){base.$label.hide();base.showing=false}},200);base.$field.focus(function(){base.fadeOnFocus()}).blur(function(){base.checkForEmpty(true)}).bind('keydown.infieldlabel',function(e){base.hideOnChange(e)}).bind('paste',function(e){base.setOpacity(0.0)}).change(function(e){base.checkForEmpty()}).bind('onPropertyChange',function(){base.checkForEmpty()}).bind('keyup.infieldlabel',function(){base.checkForEmpty()})};base.fadeOnFocus=function(){if(base.showing){base.setOpacity(base.options.fadeOpacity)}};base.setOpacity=function(opacity){base.$label.stop().animate({opacity:opacity},base.options.fadeDuration);base.showing=(opacity>0.0)};base.checkForEmpty=function(blur){if(base.$field.val()===""){base.prepForShow();base.setOpacity(blur?1.0:base.options.fadeOpacity)}else{base.setOpacity(0.0)}};base.prepForShow=function(e){if(!base.showing){base.$label.css({opacity:0.0}).show();base.$field.bind('keydown.infieldlabel',function(e){base.hideOnChange(e)})}};base.hideOnChange=function(e){if((e.keyCode===16)||(e.keyCode===9)){return}if(base.showing){base.$label.hide();base.showing=false}base.$field.unbind('keydown.infieldlabel')};base.init()};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(options){return this.each(function(){var for_attr=$(this).attr('for'),$field;if(!for_attr){return}$field=$("input#"+for_attr+"[type='text'],"+"input#"+for_attr+"[type='search'],"+"input#"+for_attr+"[type='tel'],"+"input#"+for_attr+"[type='url'],"+"input#"+for_attr+"[type='email'],"+"input#"+for_attr+"[type='password'],"+"textarea#"+for_attr);if($field.length===0){return}(new $.InFieldLabels(this,$field[0],options))})}}(jQuery)); |