o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1370240865.678797: @value" {I" class:EFI"ProcessedAsset;FI"logical_path;FI"$mercury/toolbar.button_group.js;TI" pathname;FI"Œ/Users/muntasinahmed/.rvm/gems/ruby-1.9.3-p392@global/gems/mercury-rails-0.9.0/app/assets/javascripts/mercury/toolbar.button_group.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-03T12:02:31+06:00;FI" length;Fi,I" digest;F"%04eba6b0d6088574f9dd3c2f378d71dcI" source;FI",(function() { this.Mercury.Toolbar.ButtonGroup = (function() { function ButtonGroup(name, options) { this.name = name; this.options = options != null ? options : {}; this.build(); this.bindEvents(); this.regions = this.options._regions; return this.element; } ButtonGroup.prototype.build = function() { this.element = jQuery('
', { "class": "mercury-button-group mercury-" + this.name + "-group" }); if (this.options._context || this.options._regions) { return this.element.addClass('disabled'); } }; ButtonGroup.prototype.bindEvents = function() { var _this = this; Mercury.on('region:update', function(event, options) { var context, element; context = Mercury.Toolbar.ButtonGroup.contexts[_this.name]; if (context) { if (options.region && jQuery.type(options.region.currentElement) === 'function') { element = options.region.currentElement(); if (element.length && context.call(_this, element, options.region.element)) { return _this.element.removeClass('disabled'); } else { return _this.element.addClass('disabled'); } } } }); Mercury.on('region:focused', function(event, options) { if (_this.regions && options.region && options.region.type()) { if (_this.regions.indexOf(options.region.type()) > -1) { if (!_this.options._context) { return _this.element.removeClass('disabled'); } } else { return _this.element.addClass('disabled'); } } }); return Mercury.on('region:blurred', function(event, options) { if (_this.options.regions) { return _this.element.addClass('disabled'); } }); }; return ButtonGroup; })(); this.Mercury.Toolbar.ButtonGroup.contexts = { table: function(node, region) { return !!node.closest('table', region).length; } }; }).call(this); ;TI"dependency_digest;F"%1f13cb8c184ca1d3be4d5b971b1cde26I"required_paths;F[I"Œ/Users/muntasinahmed/.rvm/gems/ruby-1.9.3-p392@global/gems/mercury-rails-0.9.0/app/assets/javascripts/mercury/toolbar.button_group.js.coffee;TI"dependency_paths;F[{I" path;FI"Œ/Users/muntasinahmed/.rvm/gems/ruby-1.9.3-p392@global/gems/mercury-rails-0.9.0/app/assets/javascripts/mercury/toolbar.button_group.js.coffee;TI" mtime;FI"2013-06-03T12:02:31+06:00;FI" digest;F"%fdb3a8835f7c140035876c6232464d4cI" _version;F"%6776f581a4329e299531e1d52aa59832