diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 |
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-16 17:31:20 +0200 |
| commit | 7f5030ac208c30a7dc576a57cd9e665022ccbde5 (patch) | |
| tree | 6b23e78aa8cc2dd363def46e083217e3c9b52f1b /modules/gallery/libraries/Menu.php | |
| parent | 923732ca4dca6db218f6252a7133cd72f98fa086 (diff) | |
| parent | 85b0f580291e375a2c5ec21b8210e59023ee24c2 (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
| -rw-r--r-- | modules/gallery/libraries/Menu.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index 6d0881ce..a39b59a5 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -136,7 +136,9 @@ class Menu_Core extends Menu_Element { return new Menu_Element_Dialog($type); case "root": - return new Menu("root"); + $menu = new Menu("root"); + $menu->css_class("gMenu"); + return $menu; case "submenu": return new Menu("submenu"); @@ -156,6 +158,7 @@ class Menu_Core extends Menu_Element { } } } + return $this; } public function __construct($type) { @@ -206,8 +209,8 @@ class Menu_Core extends Menu_Element { } public function __toString() { - $html = $this->is_root ? "<ul class=\"gMenu\">" : - "<li><a href=#>$this->label</a><ul class=\"gMenu\">"; + $html = $this->is_root ? "<ul class=\"$this->css_class\">" : + "<li title=\"$this->label\"><a href=\"#\">$this->label</a><ul>"; $html .= implode("\n", $this->elements); $html .= $this->is_root ? "</ul>" : "</ul></li>"; return $html; |
