o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1392321407.877525: @value"ë {I" class:EFI"BundledAsset;FI"logical_path;FI"3iugu-ux/components/usecode/iugu-ui-checkbox.js;TI" pathname;FI"u/Users/nkr/Projetos/Iugu/iugu-ux/vendor/assets/javascripts/iugu-ux/components/usecode/iugu-ui-checkbox.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2014-01-14T09:59:34-02:00;FI" length;Fi×I" digest;F"%d63d601fce5db6954decc5be9f2658c5I" source;FI"×(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 + '
', "data-mode": "toggle", "data-input": this.el.attr("id") }); this.decorator.insertAfter(this.el); return new IuguUI.Button({ el: this.decorator, context: this.el }); }; return Checkbox; })(); this.IuguUI.Checkbox = IuguUI.Checkbox; $(function() { return IuguUI.Checkbox.load(); }); }).call(this); ;TI"required_assets_digest;F"%dd32be2c147204a5ca22e3e9e56b0587I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862