diff options
author | Scott Dale <sdale@pfsense.org> | 2007-07-23 03:06:08 +0000 |
---|---|---|
committer | Scott Dale <sdale@pfsense.org> | 2007-07-23 03:06:08 +0000 |
commit | c955b315205860c53b85c7e478f89d27ebd40916 (patch) | |
tree | 15f143fc81ca7c45f7309435ead08ed49dd31364 /etc | |
parent | 15aea4cb3f808d5b43292ba145c9a8aeae00d520 (diff) | |
download | pfsense-c955b315205860c53b85c7e478f89d27ebd40916.zip pfsense-c955b315205860c53b85c7e478f89d27ebd40916.tar.gz |
add tab for widgets function
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index a4419ce..9858487 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -3686,4 +3686,38 @@ function is_wan_interface_up($interface) { return false; } +function display_widget_tabs(& $tab_array) { + echo "<div id='tabs'>"; + $tabscounter = 0; + foreach ($tab_array as $ta) { + $dashpos = strpos($ta[2],'-'); + $tabname = $ta[2] . "-tab"; + $tabclass = substr($ta[2],0,$dashpos); + $tabclass = $tabclass . "-class"; + if ($ta[1] == true) { + $tabActive = "table-cell"; + $tabNonActive = "none"; + } + else { + $tabActive = "none"; + $tabNonActive = "table-cell"; + } + echo "<div id='{$ta[2]}-active' class='{$tabclass}-tabactive' style='display:{$tabActive}; background-color:#EEEEEE; color:black;'>"; + echo "<B> {$ta[0]}"; + echo " </B>"; + echo "</div>"; + + echo "<div id='{$ta[2]}-deactive' class='{$tabclass}-tabdeactive' style='display:{$tabNonActive}; background-color:#777777; color:white; cursor: pointer;' onClick=\"return changeTabDIV('{$ta[2]}')\">"; + echo "<B> {$ta[0]}"; + echo " </B>"; + echo "</div>"; + } + + echo "<script type=\"text/javascript\">"; + echo "NiftyCheck();\n"; + echo "Rounded(\"div.{$tabclass}-tabactive\",\"top\",\"#CCCCCC\",\"#EEEEEE\",\"smooth\");\n"; + echo "Rounded(\"div.{$tabclass}-tabdeactive\",\"top\",\"#CCCCCC\",\"#777777\",\"smooth\");\n"; + echo "</script>"; + echo "</div>"; +} ?> |