o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1382743070.374943: @value"6 {I" class:ETI"ProcessedAsset;FI"logical_path;TI":active_admin/components/jquery.aa.checkbox-toggler.js;FI" pathname;TI"/Users/matt/.rvm/gems/ruby-2.0.0-p195/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-08-16T20:34:28-04:00;TI" length;Ti!I" digest;TI"%51514598c049ed88286838465331e8f2;FI" source;TI"!(function() { window.AA.CheckboxToggler = AA.CheckboxToggler = (function() { function CheckboxToggler(options, container) { var defaults; this.options = options; this.container = container; defaults = {}; this.options = $.extend({}, defaults, options); this._init(); this._bind(); } CheckboxToggler.prototype._init = function() { if (!this.container) { throw new Error('Container element not found'); } else { this.$container = $(this.container); } if (!this.$container.find('.toggle_all').length) { throw new Error('"toggle all" checkbox not found'); } else { this.toggle_all_checkbox = this.$container.find('.toggle_all'); } return this.checkboxes = this.$container.find(':checkbox').not(this.toggle_all_checkbox); }; CheckboxToggler.prototype._bind = function() { var _this = this; this.checkboxes.change(function(e) { return _this._didChangeCheckbox(e.target); }); return this.toggle_all_checkbox.change(function() { return _this._didChangeToggleAllCheckbox(); }); }; CheckboxToggler.prototype._didChangeCheckbox = function(checkbox) { switch (this.checkboxes.filter(':checked').length) { case this.checkboxes.length - 1: return this.toggle_all_checkbox.prop({ checked: null }); case this.checkboxes.length: return this.toggle_all_checkbox.prop({ checked: true }); } }; CheckboxToggler.prototype._didChangeToggleAllCheckbox = function() { var setting, _this = this; setting = this.toggle_all_checkbox.prop('checked') ? true : null; return this.checkboxes.each(function(index, el) { $(el).prop({ checked: setting }); return _this._didChangeCheckbox(el); }); }; return CheckboxToggler; })(); jQuery(function($) { return $.widget.bridge('checkboxToggler', AA.CheckboxToggler); }); }).call(this); ;TI"dependency_digest;TI"%58847760caf7aeffecce7aab816d5ae8;FI"required_paths;T[I"/Users/matt/.rvm/gems/ruby-2.0.0-p195/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;FI"dependency_paths;T[{I" path;TI"/Users/matt/.rvm/gems/ruby-2.0.0-p195/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;FI" mtime;TI"2013-08-16T20:34:28-04:00;TI" digest;TI"%9849fdf0f73058371d446d62f366a71c;FI" _version;TI"%ffd318ca8b794f42f5029101c2cf5d91;F