o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1373122429.5700514: @value"1 {I" class:EFI"ProcessedAsset;FI"logical_path;FI":active_admin/components/jquery.aa.checkbox-toggler.js;TI" pathname;FI"•/home/raven/.rvm/gems/ruby-1.9.3-p392@jips/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-01T21:41:21+02:00;FI" length;Fi!I" digest;F"%51514598c049ed88286838465331e8f2I" source;FI"!(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;F"%58847760caf7aeffecce7aab816d5ae8I"required_paths;F[I"•/home/raven/.rvm/gems/ruby-1.9.3-p392@jips/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;TI"dependency_paths;F[{I" path;FI"•/home/raven/.rvm/gems/ruby-1.9.3-p392@jips/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/components/jquery.aa.checkbox-toggler.js.coffee;TI" mtime;FI"2013-06-01T21:41:21+02:00;FI" digest;F"%9849fdf0f73058371d446d62f366a71cI" _version;F"%ffd318ca8b794f42f5029101c2cf5d91