Sha256: 37c13dcf83636dae5a4ae439e62896aef31788ecaa02955d0f88be68774a4621

Contents?: true

Size: 569 Bytes

Versions: 17

Compression:

Stored size: 569 Bytes

Contents

module Eac
  module MenusHelper
    def dropdown_menu(entries)
      entries = DataBuilder.new(self).build(entries)
      return nil unless entries
      id = SecureRandom.hex(5)
      GuiBuilder.new(self).build(entries, id: id, class: 'jMenu') <<
        content_tag(:script) { raw("$(document).ready(function(){$('\##{id}').jMenu();});") }
    end

    def bootstrap_dropdown_menu(entries, options = {})
      entries = DataBuilder.new(self).build(entries)
      return nil unless entries
      BootstrapGuiBuilder.new(self, options).build(entries)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
eac_rails_utils-0.8.0 lib/eac/menus_helper.rb
eac_rails_utils-0.7.1 lib/eac/menus_helper.rb
eac_rails_utils-0.7.0 lib/eac/menus_helper.rb
eac_rails_utils-0.6.0 lib/eac/menus_helper.rb
eac_rails_utils-0.5.0 lib/eac/menus_helper.rb
eac_rails_utils-0.4.0 lib/eac/menus_helper.rb
eac_rails_utils-0.3.0 lib/eac/menus_helper.rb
eac_rails_utils-0.2.2 lib/eac/menus_helper.rb
eac_rails_utils-0.2.1 lib/eac/menus_helper.rb
eac_rails_utils-0.2.0 lib/eac/menus_helper.rb
eac_rails_utils-0.1.15 lib/eac/menus_helper.rb
eac_rails_utils-0.1.14 lib/eac/menus_helper.rb
eac_rails_utils-0.1.13 lib/eac/menus_helper.rb
eac_rails_utils-0.1.12 lib/eac/menus_helper.rb
eac_rails_utils-0.1.11 lib/eac/menus_helper.rb
eac_rails_utils-0.1.10 lib/eac/menus_helper.rb
eac_rails_utils-0.0.1 lib/eac/menus_helper.rb