mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-31 16:59:22 -04:00
Get the thumbnail menu working.
1) Stop changing the menu classes in JS, instead allow us to specify it in the Menu class itself and then set it to be gThumbMenu in Theme_View 2) Move the gThumbMenu init code to the bottom of the $(document).ready() block; something in there was interfering with it.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user