From 612f2f98e4227c8ed00ab983b52aff501534d75a Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 9 Dec 2011 14:57:50 -0800 Subject: [PATCH] [#692] Fix and simplify the top menu open/closing * Remove bunch of extra code from choosen * Fix awkward indention * Add admin menu items to the Modules menu * Turn off bold on menu item hover, was causing jumping in width * Fix color on opened top menus * Fix a bunch of edge cases in the menu clicks. * Remove gross 'html' binding in favor of a one time only one --- app/views/layouts/base.rhtml | 13 ++-- public/javascripts/application.js | 112 +++++++++++++---------------- public/stylesheets/application.css | 7 +- 3 files changed, 63 insertions(+), 69 deletions(-) diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 15318605..9b87f82f 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -67,20 +67,25 @@ <% more_top_menu_items.each do |item| %> <%= render_menu_node(item) %> <% end %> + <%# TODO: Extract to helper %> + <% if User.current.admin? %> + <% menu_items_for(:admin_menu) do |item| -%> +
  • <%= link_to h(item.caption), item.url, item.html_options %>
  • + <% end -%> + <% end %>
  • <%= render_menu_node(help_menu_item) %> <% unless User.current.logged? %> -
  • +
  • <% else %> -