diff options
author | Colin Fleming <cj_fleming@sky.com> | 2014-12-14 22:03:37 +0000 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2014-12-14 22:03:37 +0000 |
commit | 6678fdd1ebd720c9c4de34069cafb7f153354a20 (patch) | |
tree | 5bc59e2184ebdae1bd54275e3403d31b5fff35a1 /usr/local/www | |
parent | f358fe3f6d105e3efad1497726cd363ece1fdfa6 (diff) | |
download | pfsense-6678fdd1ebd720c9c4de34069cafb7f153354a20.zip pfsense-6678fdd1ebd720c9c4de34069cafb7f153354a20.tar.gz |
Tidy up "widgets" XHTML
Add CDATA sections to scripts
Add ALT to image tags and close image tags
DIV tag cannot be inside a STRONG tag, so swap them around
SCRIPT cannot be part of TR tag, so place the SCRIPT inside a TD tag but
hide it.
Diffstat (limited to 'usr/local/www')
4 files changed, 16 insertions, 10 deletions
diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index cf42283..05760fe 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -125,9 +125,13 @@ $counter = 1; } echo "<td class=\"listr ellipsis\" align=\"center\" id=\"gateway$counter\">$online</td>\n"; ?> + <td style="display:none;"> <script type="text/javascript"> + //<![CDATA[ jQuery('#gateway<?php echo $counter;?>').css('background-color',"<?php echo $bgcolor;?>"); + //]]> </script> + </td> <?php $counter++; ?> diff --git a/usr/local/www/widgets/widgets/interfaces.widget.php b/usr/local/www/widgets/widgets/interfaces.widget.php index bcf8704..4cdee4e 100644 --- a/usr/local/www/widgets/widgets/interfaces.widget.php +++ b/usr/local/www/widgets/widgets/interfaces.widget.php @@ -103,21 +103,19 @@ foreach ($ifdescrs as $ifdescr => $ifname): </tr> <tr> <td class="listr"> - <strong> <?php if($ifinfo['ipaddr'] != ""): ?> - <div id="<?php echo $ifname;?>-ip" style="display:inline"><?=htmlspecialchars($ifinfo['ipaddr']);?> </div> + <div id="<?php echo $ifname;?>-ip" style="display:inline"><strong><?=htmlspecialchars($ifinfo['ipaddr']);?> </strong></div> <br /> <?php endif; if ($ifinfo['ipaddrv6'] != ""): ?> - <div id="<?php echo $ifname;?>-ipv6" style="display:inline"><?=htmlspecialchars($ifinfo['ipaddrv6']);?> </div> + <div id="<?php echo $ifname;?>-ipv6" style="display:inline"><strong><?=htmlspecialchars($ifinfo['ipaddrv6']);?> </strong></div> <?php endif; ?> - </strong> </td> </tr> <?php diff --git a/usr/local/www/widgets/widgets/ntp_status.widget.php b/usr/local/www/widgets/widgets/ntp_status.widget.php index 68c27e1..baefa5b 100644 --- a/usr/local/www/widgets/widgets/ntp_status.widget.php +++ b/usr/local/www/widgets/widgets/ntp_status.widget.php @@ -215,7 +215,7 @@ function clockTimeString($inDate, $showSeconds) { ?> <script type="text/javascript"> -<!-- +//<![CDATA[ /* set up variables used to init clock in BODY's onLoad handler; should be done as early as possible */ var clockLocalStartTime = new Date(); @@ -225,12 +225,12 @@ var clockServerStartTime = new Date(<?php echo(getServerDateItems($gDate))?>); will be overridden by next JavaScript1.2 block */ function clockInit() { } -//--> +//]]> </script> <script type="text/javascript"> -<!-- +//<![CDATA[ /*** simpleFindObj, by Andrew Shearer Efficiently finds an object by name/id, using whichever of the IE, @@ -450,10 +450,10 @@ function clockUpdate() } /*** End of Clock ***/ -//--> window.onload=clockInit(clockLocalStartTime, clockServerStartTime);clockOnLoad(); window.onunload=clockOnUnload() clockUpdate(); +//]]> </script> @@ -483,6 +483,7 @@ function clockUpdate() </div> <script type="text/javascript"> +//<![CDATA[ function ntp_getstatus() { scroll(0,0); var url = "/widgets/widgets/ntp_status.widget.php"; @@ -504,4 +505,5 @@ function clockUpdate() } // Do the first status check 1 second after the dashboard opens setTimeout('ntp_getstatus()', 1000); +//]]> </script> diff --git a/usr/local/www/widgets/widgets/openvpn.widget.php b/usr/local/www/widgets/widgets/openvpn.widget.php index e97cd8c..64d576b 100644 --- a/usr/local/www/widgets/widgets/openvpn.widget.php +++ b/usr/local/www/widgets/widgets/openvpn.widget.php @@ -65,6 +65,7 @@ $clients = openvpn_get_active_clients(); <br /> <script type="text/javascript"> +//<![CDATA[ function killClient(mport, remipp) { var busy = function(index,icon) { jQuery(icon).bind("onclick",""); @@ -92,6 +93,7 @@ $clients = openvpn_get_active_clients(); function(index,row) { jQuery(row).fadeOut(1000); } ); } +//]]> </script> <?php foreach ($servers as $server): ?> @@ -180,7 +182,7 @@ $clients = openvpn_get_active_clients(); /* tunnel is down */ $iconfn = "interface_down"; } - echo "<img src ='/themes/{$g['theme']}/images/icons/icon_{$iconfn}.gif'>"; + echo "<img src ='/themes/{$g['theme']}/images/icons/icon_{$iconfn}.gif' alt='' />"; ?> </td> </tr> @@ -230,7 +232,7 @@ $clients = openvpn_get_active_clients(); /* tunnel is down */ $iconfn = "interface_down"; } - echo "<img src ='/themes/{$g['theme']}/images/icons/icon_{$iconfn}.gif'>"; + echo "<img src ='/themes/{$g['theme']}/images/icons/icon_{$iconfn}.gif' alt='' />"; ?> </td> </tr> |