summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Menu.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-07-13 07:11:02 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-07-13 07:11:02 -0700
commit021e6eccd03df460fddb0d2bdcab335ddd2d6c52 (patch)
tree61a5fe2bd4b8e8f52edcb3b530fc3f4cb52d5a93 /modules/gallery/libraries/Menu.php
parent75be4ab2e62004811ba7086376bf5abeca4cf791 (diff)
parenta944bf4259a6ff31ac647a3d8336bd5175c3640a (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
-rw-r--r--modules/gallery/libraries/Menu.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php
index d37be7d3..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 title=\"$this->label\"><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;