diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 08:47:18 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-05-29 08:47:18 +0000 |
| commit | 0990cdce6c98be640a3c70bea413ac1f44865016 (patch) | |
| tree | 97a9c36f69226f682f7326b668ee99b07ca6c684 /frontends/php/include/classes/cpumenu.inc.php | |
| parent | 3442ec61fa38eea4e68a3edea4ea3225ff78c8a0 (diff) | |
| download | zabbix-0990cdce6c98be640a3c70bea413ac1f44865016.tar.gz zabbix-0990cdce6c98be640a3c70bea413ac1f44865016.tar.xz zabbix-0990cdce6c98be640a3c70bea413ac1f44865016.zip | |
- changed IT Services interface (Artem)
- added class CTree
- added Javascript class for Cookies management
git-svn-id: svn://svn.zabbix.com/trunk@4188 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/classes/cpumenu.inc.php')
| -rw-r--r-- | frontends/php/include/classes/cpumenu.inc.php | 136 |
1 files changed, 67 insertions, 69 deletions
diff --git a/frontends/php/include/classes/cpumenu.inc.php b/frontends/php/include/classes/cpumenu.inc.php index 95cb104e..ef583ea6 100644 --- a/frontends/php/include/classes/cpumenu.inc.php +++ b/frontends/php/include/classes/cpumenu.inc.php @@ -1,69 +1,67 @@ -<?php -/* -** ZABBIX -** Copyright (C) 2000-2005 SIA Zabbix -** -** This program is free software; you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation; either version 2 of the License, or -** (at your option) any later version. -** -** This program is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with this program; if not, write to the Free Software -** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -**/ -?> -<?php - class CPUMenu - { -/* private */ - /* - var $items = array(); - var $width; - */ -/* public */ - function CPUMenu($items=array(), $width=null) - { - $this->InsertJavaScript(); - /*********************** ITEM ARRAY *********************** - ITEM: array(name, url, param, css, submenu1, submenu2, ... , submenuN) - - name: text - url: text (url for href perameter) - param: array(tw => t_val, sb => s_val) - tw: target parameter - t_val: one of '_blank', '_parent', '_self', '_top' - sb: text for statusbar) - s_val: text - css: array(outer => cssarray, inner => cssarray) - outer -> style for outer div element - inner -> style for inner link element with text - cssarray -> array(normal, mouseover, mousedown) - submen1-N: list of subitems - **********************************************************/ - $this->items = $items; - $this->width = $width; - } - - function GetOnActionJS() - { - if(count($this->items) <= 0) return NULL; - - return 'return show_popup_menu(event,'.zbx_jsvalue($this->items).','.zbx_jsvalue($this->width).');'; - } - - function InsertJavaScript() - { - if(defined('CPUMENU_INSERTJAVASCRIPT_INSERTED')) return; - define('CPUMENU_INSERTJAVASCRIPT_INSERTED', 1); -?> -<script language="JavaScript" type="text/javascript" src="js/menu.js"></script> -<?php - } - } -?> +<?php
+/*
+** ZABBIX
+** Copyright (C) 2000-2005 SIA Zabbix
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+**/
+?>
+<?php
+ class CPUMenu
+ {
+/* private */
+ /*
+ var $items = array();
+ var $width;
+ */
+/* public */
+ function CPUMenu($items=array(), $width=null)
+ {
+ $this->InsertJavaScript();
+ /*********************** ITEM ARRAY ***********************
+ ITEM: array(name, url, param, css, submenu1, submenu2, ... , submenuN)
+
+ name: text
+ url: text (url for href perameter)
+ param: array(tw => t_val, sb => s_val)
+ tw: target parameter
+ t_val: one of '_blank', '_parent', '_self', '_top'
+ sb: text for statusbar)
+ s_val: text
+ css: array(outer => cssarray, inner => cssarray)
+ outer -> style for outer div element
+ inner -> style for inner link element with text
+ cssarray -> array(normal, mouseover, mousedown)
+ submen1-N: list of subitems
+ **********************************************************/
+ $this->items = $items;
+ $this->width = $width;
+ }
+
+ function GetOnActionJS()
+ {
+ if(count($this->items) <= 0) return NULL;
+
+ return 'return show_popup_menu(event,'.zbx_jsvalue($this->items).','.zbx_jsvalue($this->width).');';
+ }
+
+ function InsertJavaScript()
+ {
+ if(defined('CPUMENU_INSERTJAVASCRIPT_INSERTED')) return;
+ define('CPUMENU_INSERTJAVASCRIPT_INSERTED', 1);
+ echo '<script language="JavaScript" type="text/javascript" src="js/menu.js"></script>';
+ }
+ }
+?>
|
