Sha256: 14e414f97ceb4c8dd875a6df77ecd9b51a76f2b5e872e51d3eae1309e2ef53ea
Contents?: true
Size: 1.64 KB
Versions: 4
Compression:
Stored size: 1.64 KB
Contents
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1332874154.3690684 žÑ:@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"%9a8a42d3f64292ae8182640e5ab6b601
Version data entries
4 entries across 4 versions & 1 rubygems