{I" class:ETI"BundledAsset;FI"logical_path;TI"mercury/palette.js;FI" pathname;TI"‡/home/edik/.rvm/gems/ruby-2.0.0-p247@very_simple_cms/bundler/gems/mercury-3e0245e33195/app/assets/javascripts/mercury/palette.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+½¡9RI" length;Ti“I" digest;TI"%b2f639eac7280d6c799f015fec04a8ef;FI" source;TI"“(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.position(); 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); ;TI"required_assets_digest;TI"%4995b2fd9ceda4c8242a89e4382d07c2;FI" _version;TI"%2cf3622cbba861b85d33ffabfa420c13;F