o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1355470625.244577: @value"Ž {I" class:EFI"BundledAsset;FI"logical_path;FI"mercury/palette.js;FI" pathname;FI"y/Users/brownjohn/.rvm/gems/ruby-1.9.3-p194/gems/mercury-rails-0.8.0/app/assets/javascripts/mercury/palette.js.coffee;FI"content_type;FI"application/javascript;FI" mtime;FI"2012-08-08T16:13:36+08:00;FI" length;Fi’I" digest;F"%50294678b687bc784c1f648b9d50f035I" source;FI"’(function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; this.Mercury.Palette = (function(_super) { __extends(Palette, _super); function Palette(url, name, options) { this.url = url; this.name = name; this.options = options != null ? options : {}; Palette.__super__.constructor.apply(this, arguments); } Palette.prototype.build = function() { var _ref; this.element = jQuery('
', { "class": "mercury-palette mercury-" + this.name + "-palette loading", style: 'display:none' }); return this.element.appendTo((_ref = jQuery(this.options.appendTo).get(0)) != null ? _ref : 'body'); }; Palette.prototype.bindEvents = function() { var _this = this; Mercury.on('hide:dialogs', function(event, dialog) { if (dialog !== _this) { return _this.hide(); } }); return Palette.__super__.bindEvents.apply(this, arguments); }; Palette.prototype.position = function(keepVisible) { var position, width; this.element.css({ top: 0, left: 0, display: 'block', visibility: 'hidden' }); position = this.button.offset(); width = this.element.width(); if (position.left + width > jQuery(window).width()) { position.left = position.left - width + this.button.width(); } return this.element.css({ top: position.top + this.button.height(), left: position.left, display: keepVisible ? 'block' : 'none', visibility: 'visible' }); }; return Palette; })(Mercury.Dialog); }).call(this); ;FI"required_assets_digest;F"%604cfa0702c7803aad00dfd22427715bI" _version;F"%9f3b95dd7ea3030dc35985c0a8020862