commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / packages / OpenFlashChart / php-ofc-library / ofc_menu.php
CommitLineData
7f254ad8
AE
1<?php\r
2\r
3class ofc_menu_item\r
4{\r
5 /**\r
6 * @param $text as string. The menu item text.\r
7 * @param $javascript_function_name as string. The javascript function name, the\r
8 * js function takes one parameter, the chart ID. See ofc_menu_item_camera for\r
9 * some example code.\r
10 */\r
11 function ofc_menu_item($text, $javascript_function_name)\r
12 {\r
13 $this->type = "text";\r
14 $this->text = $text;\r
15 $tmp = 'javascript-function';\r
16 $this->$tmp = $javascript_function_name;\r
17 }\r
18}\r
19\r
20class ofc_menu_item_camera\r
21{\r
22 /**\r
23 * @param $text as string. The menu item text.\r
24 * @param $javascript_function_name as string. The javascript function name, the\r
25 * js function takes one parameter, the chart ID. So for example, our js function\r
26 * could look like this:\r
27 *\r
28 * function save_image( chart_id )\r
29 * {\r
30 * alert( chart_id );\r
31 * }\r
32 *\r
33 * to make a menu item call this: ofc_menu_item_camera('Save chart', 'save_image');\r
34 */\r
35 function ofc_menu_item_camera($text, $javascript_function_name)\r
36 {\r
37 $this->type = "camera-icon";\r
38 $this->text = $text;\r
39 $tmp = 'javascript-function';\r
40 $this->$tmp = $javascript_function_name;\r
41 }\r
42}\r
43\r
44class ofc_menu\r
45{\r
46 function ofc_menu($colour, $outline_colour)\r
47 {\r
48 $this->colour = $colour;\r
49 $this->outline_colour = $outline_colour;\r
50 }\r
51 \r
52 function values($values)\r
53 {\r
54 $this->values = $values;\r
55 }\r
56}