o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1357905156.606603: @value"{I" class:EFI"ProcessedAsset;FI"logical_path;FI"1active_admin/components/jquery.aa.popover.js;TI" pathname;FI"·/Users/holgerfrohloff/Desktop/git/Goldencobra/.bundle/gems/ruby/1.9.1/bundler/gems/active_admin-ed1a5e3055bc/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee;TI"content_type;FI"application/javascript;FI" mtime;FI"2012-11-02T16:39:33+01:00;FI" length;Fiª I" digest;F"%2e9320902dfb81b4268b7b7f596fdb6eI" source;FI"ª (function() { window.AA.Popover = AA.Popover = (function() { function Popover(options, element) { var defaults; this.options = options; this.element = element; this.$element = $(this.element); defaults = { fadeInDuration: 20, fadeOutDuration: 100, autoOpen: true, pageWrapperElement: "#wrapper", onClickActionItemCallback: null }; this.options = $.extend({}, defaults, options); this.$popover = null; this.isOpen = false; if ($(this.$element.attr("href")).length > 0) { this.$popover = $(this.$element.attr("href")); } else { this.$popover = this.$element.next(".popover"); } this._buildPopover(); this._bind(); return this; } Popover.prototype.open = function() { this.isOpen = true; this.$popover.fadeIn(this.options.fadeInDuration); this._positionPopover(); this._positionNipple(); return this; }; Popover.prototype.close = function() { this.isOpen = false; this.$popover.fadeOut(this.options.fadeOutDuration); return this; }; Popover.prototype.destroy = function() { this.$element.removeData('popover'); this.$element.unbind(); this.$element = null; return this; }; Popover.prototype.option = function() {}; Popover.prototype._buildPopover = function() { this.$popover.prepend("
"); this.$popover.hide(); return this.$popover.addClass("popover"); }; Popover.prototype._bind = function() { var _this = this; $(this.options.pageWrapperElement).bind('click', function(e) { if (_this.isOpen === true) { return _this.close(); } }); if (this.options.autoOpen === true) { return this.$element.bind('click', function() { if (_this.isOpen === true) { _this.close(); } else { _this.open(); } return false; }); } }; Popover.prototype._positionPopover = function() { var centerOfButtonFromLeft, centerOfPopoverFromLeft, popoverLeftPos; centerOfButtonFromLeft = this.$element.offset().left + this.$element.outerWidth() / 2; centerOfPopoverFromLeft = this.$popover.outerWidth() / 2; popoverLeftPos = centerOfButtonFromLeft - centerOfPopoverFromLeft; return this.$popover.css("left", popoverLeftPos); }; Popover.prototype._positionNipple = function() { var $nipple, bottomOfButtonFromTop, centerOfPopoverFromLeft, centerOfnippleFromLeft, nippleLeftPos; centerOfPopoverFromLeft = this.$popover.outerWidth() / 2; bottomOfButtonFromTop = this.$element.offset().top + this.$element.outerHeight() + 10; this.$popover.css("top", bottomOfButtonFromTop); $nipple = this.$popover.find(".popover_nipple"); centerOfnippleFromLeft = $nipple.outerWidth() / 2; nippleLeftPos = centerOfPopoverFromLeft - centerOfnippleFromLeft; return $nipple.css("left", nippleLeftPos); }; return Popover; })(); (function($) { return $.widget.bridge('popover', AA.Popover); })(jQuery); }).call(this); ;TI"dependency_digest;F"%63ba9000b9bc34170c9782f5b36642c9I"required_paths;F[I"·/Users/holgerfrohloff/Desktop/git/Goldencobra/.bundle/gems/ruby/1.9.1/bundler/gems/active_admin-ed1a5e3055bc/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee;TI"dependency_paths;F[{I" path;FI"·/Users/holgerfrohloff/Desktop/git/Goldencobra/.bundle/gems/ruby/1.9.1/bundler/gems/active_admin-ed1a5e3055bc/app/assets/javascripts/active_admin/components/jquery.aa.popover.js.coffee;TI" mtime;FI"2012-11-02T16:39:33+01:00;FI" digest;F"%5e16e39a01229b74ee082957a934897fI" _version;F"%ffd318ca8b794f42f5029101c2cf5d91