Sha256: 1590990ba2db6213ab62cf48425a85c30d741d6a06fabb218efed381420ee895
Contents?: true
Size: 1.64 KB
Versions: 9
Compression:
Stored size: 1.64 KB
Contents
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1339771359.9915142:@value{ I"length:EFi›I"digest; F"%725155d4eab4c9f3f265a35dbcd39d9eI"source; FI"›(function($) { /* * Auto-growing textareas */ $.fn.autogrow = function(options) { this.filter('textarea').each(function() { var $this = $(this), minHeight = $this.height(), lineHeight = $this.css('lineHeight'); var shadow = $('<div></div>').css({ position: 'absolute', top: -10000, left: -10000, width: $(this).width() - parseInt($this.css('paddingLeft')) - parseInt($this.css('paddingRight')), fontSize: $this.css('fontSize'), fontFamily: $this.css('fontFamily'), lineHeight: $this.css('lineHeight'), resize: 'none' }).appendTo(document.body); var update = function() { var times = function(string, number) { var _res = ''; for(var i = 0; i < number; i ++) { _res = _res + string; } return _res; }; var val = this.value.replace(/</g, '<') .replace(/>/g, '>') .replace(/&/g, '&') .replace(/\n$/, '<br/> ') .replace(/\n/g, '<br/>') .replace(/ {2,}/g, function(space) { return times(' ', space.length -1) + ' ' }); shadow.html(val); $(this).css('height', Math.max(shadow.height() + 20, minHeight)); } $(this).change(update).keyup(update).keydown(update); update.apply(this); }); return this; } })(jQuery); ; FI" _version; F"%280ef8a67c63f328318a5216512dc3e8
Version data entries
9 entries across 9 versions & 1 rubygems