From 3449827c5ae3f28b0353d7babd354b92f403e5bf Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 7 Dec 2008 22:10:23 +0000 Subject: Change the menu processing to add the gDialogLink class if the url starts with a #. this results in a modal dialog box being opened. At this point the url is not retrieved and the text just shows up in the dialog box... need to look at that --- core/libraries/Menu.php | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'core/libraries/Menu.php') diff --git a/core/libraries/Menu.php b/core/libraries/Menu.php index c1426e87..6f1114a9 100644 --- a/core/libraries/Menu.php +++ b/core/libraries/Menu.php @@ -17,19 +17,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class Menu_Item { - protected $_text; - protected $_url; - - function __constructor($text, $url="#") { - $this->_text = $text; - $this->_url = $url; - } - - function __toString() { - return "
  • _url\">$this->_text
  • "; - } -} class Menu_Core { protected $_text; @@ -89,7 +76,15 @@ class Menu_Core { public function __toString() { $items_html = array(); if (!empty($this->_text)) { - $items_html[] = "
  • _url\">$this->_text"; + if ($this->_url[0] == "#") { + $class = "class=\"gDialogLink\""; + $url = substr($this->_url, 1); + } else { + $class = ""; + $url = $this->_url; + } + + $items_html[] = "
  • $this->_text"; } if (!empty($this->_items)) { -- cgit v1.2.3