o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1370240863.9850051: @value"£ {I" class:EFI"ProcessedAsset;FI"logical_path;FI"mercury/select.js;TI" pathname;FI"~/Users/muntasinahmed/.rvm/gems/ruby-1.9.3-p392@global/gems/mercury-rails-0.9.0/app/assets/javascripts/mercury/select.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2013-06-03T12:02:31+06:00;FI" length;Fiü I" digest;F"%0a5ecd74159bb1e8d46719ddecd0c3b7I" 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.Select = (function(_super) { __extends(Select, _super); function Select(url, name, options) { this.url = url; this.name = name; this.options = options != null ? options : {}; Select.__super__.constructor.apply(this, arguments); } Select.prototype.build = function() { var _ref; this.element = jQuery('
', { "class": "mercury-select mercury-" + this.name + "-select loading", style: 'display:none' }); return this.element.appendTo((_ref = jQuery(this.options.appendTo).get(0)) != null ? _ref : 'body'); }; Select.prototype.bindEvents = function() { var _this = this; Mercury.on('hide:dialogs', function(event, dialog) { if (dialog !== _this) { return _this.hide(); } }); this.element.on('mousedown', function(event) { return event.preventDefault(); }); return Select.__super__.bindEvents.apply(this, arguments); }; Select.prototype.position = function(keepVisible) { var documentHeight, elementHeight, elementWidth, height, left, position, top; this.element.css({ top: 0, left: 0, display: 'block', visibility: 'hidden' }); position = this.button.position(); elementWidth = this.element.width(); elementHeight = this.element.height(); documentHeight = jQuery(document).height(); top = position.top + (this.button.height() / 2) - (elementHeight / 2); if (top < position.top - 100) { top = position.top - 100; } if (top < 20) { top = 20; } height = this.loaded ? 'auto' : elementHeight; if (top + elementHeight >= documentHeight - 20) { height = documentHeight - top - 20; } left = position.left; if (left + elementWidth > jQuery(window).width()) { left = left - elementWidth + this.button.width(); } return this.element.css({ top: top, left: left, height: height, display: keepVisible ? 'block' : 'none', visibility: 'visible' }); }; return Select; })(Mercury.Dialog); }).call(this); ;TI"dependency_digest;F"%ae6d8c7aaf872d94cc2cedf3c9886259I"required_paths;F[I"~/Users/muntasinahmed/.rvm/gems/ruby-1.9.3-p392@global/gems/mercury-rails-0.9.0/app/assets/javascripts/mercury/select.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/select.js.coffee;TI" mtime;FI"2013-06-03T12:02:31+06:00;FI" digest;F"%6e5f4cee0246e893feeed56ddfa2ab44I" _version;F"%6776f581a4329e299531e1d52aa59832