Sha256: f8231f362e48da8d2ca6370a8d4c555b90234495f043bf0363296551b9d3135c

Contents?: true

Size: 574 Bytes

Versions: 62

Compression:

Stored size: 574 Bytes

Contents

module ActiveAdmin
  module Views

    class Popover < ActiveAdmin::Component
      builder_method :popover

      def build(options = {}, &block)
        options           = options.dup
        contents_root_tag = options.delete(:contents_root_tag) || :div
        options[:style]   = "display: none"

        super(options)

        @contents_root = send(contents_root_tag, :class => "popover_contents")
      end

      def add_child(child)
        if @contents_root
          @contents_root << child
        else
          super
        end
      end

    end
  end
end

Version data entries

62 entries across 62 versions & 4 rubygems

Version Path
activeadmin-0.6.6 lib/active_admin/views/components/popover.rb
activeadmin-0.6.5 lib/active_admin/views/components/popover.rb
activeadmin-0.6.4 lib/active_admin/views/components/popover.rb
yousty-activeadmin-1.0.4.pre lib/active_admin/views/components/popover.rb
yousty-activeadmin-1.0.3.pre lib/active_admin/views/components/popover.rb
yousty-activeadmin-1.0.2.pre lib/active_admin/views/components/popover.rb
activeadmin-0.6.3 lib/active_admin/views/components/popover.rb
yousty-activeadmin-1.0.1.pre lib/active_admin/views/components/popover.rb
yousty-activeadmin-1.0.0.pre lib/active_admin/views/components/popover.rb
activeadmin-0.6.2 lib/active_admin/views/components/popover.rb
activeadmin-0.6.1 lib/active_admin/views/components/popover.rb
aa-rails4-0.6.0 lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.141 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/views/components/popover.rb