Commit Graph

3 Commits

Author SHA1 Message Date
Eric Davis 28e9bc5d82 Fix an IndexError if all the :last menu items are deleted from a menu. #4718
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-18 05:01:39 +00:00
Eric Davis b75e038255 Updated menus from JPL's feedback.
* Updated Mapper#push documentation
* Renamed :parent_menu to :parent
* Renamed the external API for :child_menus to :children.  Internally it needs
  to stay :child_menus because Tree::TreeNode already defines a children
  method for another purpose

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3092 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:56 +00:00
Eric Davis 1f06cf8899 Converted Menus to a Tree structure to allow submenus.
* Bundle the rubytree gem
* Patched RubyTree's TreeNode to add some additional methods.
* Converted the menu rendering to walk the Tree of MenuItems to render
  each item
* Added a menu option for :parent_menu to make this menu a child of the parent
* Added a bunch of tests
* Made MenuItem a subclass of Tree::TreeNode in order to use it's methods
  directly
* Changed the exceptions in MenuItem#new to be ArgumentErrors instead of the
  generic RuntimeError

  #4250

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-11-25 05:36:44 +00:00