diff options
author | Scott Dale <sdale@pfsense.org> | 2007-06-22 01:49:17 +0000 |
---|---|---|
committer | Scott Dale <sdale@pfsense.org> | 2007-06-22 01:49:17 +0000 |
commit | 3ee9cb77e58e3725e0b22ab6756b1314a4451ee1 (patch) | |
tree | f2148a0edf78bd6eddf1e70558f6156aa914ba71 | |
parent | 2cd5c34010fb7459dcbc289dc93b16346df6b484 (diff) | |
download | pfsense-3ee9cb77e58e3725e0b22ab6756b1314a4451ee1.zip pfsense-3ee9cb77e58e3725e0b22ab6756b1314a4451ee1.tar.gz |
correctly show/hide new widgets
-rwxr-xr-x | usr/local/www/index.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php index 757bab0..4244a26 100755 --- a/usr/local/www/index.php +++ b/usr/local/www/index.php @@ -372,10 +372,20 @@ echo $jscriptstr; <div id="col1" style="float:left;width:49%;padding: 2px;padding-bottom:40px"> <?php - if ($config['widgets']) + if ($config['widgets']){ $widgetlist = $savedwidgetfiles; + + //add widgets that may not be in the saved configuration, in case they want to be added later + foreach ($widgetfiles as $defaultwidgets){ + + if (!in_array($defaultwidgets, $savedwidgetfiles)){ + $widgetlist[] = $defaultwidgets; + } + } + + } else - $widgetlist = $widgetfiles; + $widgetlist = $widgetfiles; foreach($widgetlist as $widget) { @@ -414,9 +424,9 @@ echo $jscriptstr; $mindiv = "inline"; } else{ - $divdisplay = "block"; + $divdisplay = "none"; $display = "block"; - $inputdisplay = "show"; + $inputdisplay = "none"; $showdiv = "none"; $mindiv = "inline"; } |