{:uriI"Ífile:///Users/tvd/code/alchemy_cms/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee?type=application/javascript&pipeline=self&id=a77e487b418a5e1a3a0c6731a4f9758fa095ae48afc894e359d5e92c12b090b8:ET:load_pathI"7/Users/tvd/code/alchemy_cms/app/assets/javascripts;T: filenameI"]/Users/tvd/code/alchemy_cms/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee;T: nameI" alchemy/alchemy.list_filter;T:logical_pathI"(alchemy/alchemy.list_filter.self.js;T:content_typeI"application/javascript;T: sourceI"*(function() { if (typeof window.Alchemy === 'undefined') { window.Alchemy = {}; } Alchemy.ListFilterHandler = (function() { function ListFilterHandler(filter) { this.filter_field = $(filter); this.items = $(this.filter_field.data('alchemy-list-filter')); this.clear = this.filter_field.siblings('.js_filter_field_clear'); this._observe(); } ListFilterHandler.prototype._observe = function() { this.filter_field.on('keyup', (function(_this) { return function(e) { _this.clear.show(); return _this._filter(_this.filter_field.val()); }; })(this)); this.clear.click((function(_this) { return function(e) { e.preventDefault(); return _this._clear(); }; })(this)); this.filter_field.focus(function() { return key.setScope('list_filter'); }); return key('esc', 'list_filter', (function(_this) { return function() { _this._clear(); return _this.filter_field.blur(); }; })(this)); }; ListFilterHandler.prototype._filter = function(term) { if (term === '') { this.clear.hide(); } return this.items.map(function() { var item; item = $(this); if (item.attr('name').toLowerCase().indexOf(term.toLowerCase()) !== -1) { return item.show(); } else { return item.hide(); } }); }; ListFilterHandler.prototype._clear = function() { this.filter_field.val(''); return this._filter(''); }; return ListFilterHandler; })(); Alchemy.ListFilter = function(scope) { return $('[data-alchemy-list-filter]', scope).map(function() { return new Alchemy.ListFilterHandler(this); }); }; }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"kfile-digest:///Users/tvd/code/alchemy_cms/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%øz@>ocÿ7b¹yöÐ÷«2\Ûö“¯!Žò«G: lengthi*:dependencies_digest"%Ê &¾!Å¿d¸öò ÌÝrâ,Cfê ïzý®·á-:idI"Ea77e487b418a5e1a3a0c6731a4f9758fa095ae48afc894e359d5e92c12b090b8;F: mtimel+Äyq[