o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1372772480.9269419: @value"! {I" class:EFI"ProcessedAsset;FI"logical_path;F"3iugu-ux/components/usecode/iugu-ui-checkbox.jsI" pathname;F"{/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-checkbox.js.coffeeI"content_type;FI"application/javascript;FI" mtime;FI"2013-07-01T19:08:19-03:00;FI" length;Fiz I" digest;F"%a3ca5ff68d748118547bb7290a22d58dI" source;FI"z (function() { IuguUI.Checkbox = (function() { Checkbox.prototype.defaults = { none: false }; Checkbox.prototype.el = void 0; Checkbox.load = function(context) { var elements, selector; selector = "[data-type='iux.form.checkbox']"; if (context) { elements = context.find(selector); } else { elements = $(selector); } if (elements.length === 0) { return; } return elements.each(function() { if ($(this).data("iux.initialized") === true) { return; } new IuguUI.Checkbox({ el: this }); return $(this).data("iux.initialized", true); }); }; function Checkbox(options) { this.initialize(options); } Checkbox.prototype.initialize = function(options) { var checkbox_classes, label_off, label_on, optional_labels; _.bindAll(this); this.options = _.extend({}, this.defaults, options); if (!this.options.el) { return null; } if (this.options.el) { this.el = $(this.options.el); } checkbox_classes = "checkbox"; label_on = this.el.data("on") ? this.el.data("on") : void 0; label_off = this.el.data("off") ? this.el.data("off") : void 0; if (this.el.data("mode") === "switch") { checkbox_classes = " switch"; } optional_labels = ""; if (label_on) { optional_labels += '
' + label_on + '
'; } if (label_off) { optional_labels += '
' + label_off + '
'; } this.decorator = $('', { "class": checkbox_classes + (this.el.is(":checked") ? ' selected' : ''), html: '
' + optional_labels + '
' }); this.decorator.bind('click', this.toggle); this.el.bind('change', this.toggle); this.decorator.insertAfter(this.el); return this.el.hide(); }; Checkbox.prototype.toggle = function() { var isChecked; this.decorator.toggleClass("selected"); isChecked = this.decorator.hasClass("selected"); return this.el.attr("checked", isChecked); }; return Checkbox; })(); this.IuguUI.Checkbox = IuguUI.Checkbox; $(function() { return IuguUI.Checkbox.load(); }); }).call(this); ;TI"dependency_digest;F"%b15ea17d2c60fd724a1fd4b6ee731d0cI"required_paths;F["{/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-checkbox.js.coffeeI"dependency_paths;F[{I" path;F"{/Users/patricknegri/Desenvolvimento/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-checkbox.js.coffeeI" mtime;FI"2013-07-01T19:08:19-03:00;FI" digest;F"%d81243756710fdf331c4ca8d06b4ea56I" _version;F"%6776f581a4329e299531e1d52aa59832