{:uriI"file:///Users/nzaillian/Projects/virgo/app/assets/javascripts/virgo/common/character_counter.coffee?type=application/javascript&pipeline=self&id=9bc42e04c9777026e97579c4b806fc309c2f7fc3276f717c2d1cc698f4b9edb7:ET:load_pathI";/Users/nzaillian/Projects/virgo/app/assets/javascripts;F: filenameI"a/Users/nzaillian/Projects/virgo/app/assets/javascripts/virgo/common/character_counter.coffee;T: nameI"#virgo/common/character_counter;T:logical_pathI"+virgo/common/character_counter.self.js;T:content_typeI"application/javascript;T: sourceI"W(function() { var CharacterCounter, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; CharacterCounter = (function() { function CharacterCounter(el) { this.el = el; this.inject_counter = bind(this.inject_counter, this); this.adjust_count = bind(this.adjust_count, this); this.bind_events = bind(this.bind_events, this); this.inject_counter(); this.bind_events(); this.adjust_count(); } CharacterCounter.prototype.bind_events = function() { return this.el.keyup(this.adjust_count); }; CharacterCounter.prototype.adjust_count = function() { var count, title; count = this.el.val().length; title = count === 1 ? 'character' : 'characters'; return this.counter_el.html(count + " " + title); }; CharacterCounter.prototype.inject_counter = function() { var group; group = this.el.parents(".form-group"); this.counter_wrap = $("
"); group.prepend(this.counter_wrap); return this.counter_el = this.counter_wrap.find('.count'); }; return CharacterCounter; })(); $(function() { return $("[data-toggle='character-counter']").each(function() { return new CharacterCounter($(this)); }); }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"ofile-digest:///Users/nzaillian/Projects/virgo/app/assets/javascripts/virgo/common/character_counter.coffee;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%oWXCA G܆bs$HҖΖk: lengthiW:dependencies_digest"%(Xb%ؤ' `:idI"E9bc42e04c9777026e97579c4b806fc309c2f7fc3276f717c2d1cc698f4b9edb7;F: mtimel+U