summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-12-14 22:03:37 +0000
committerRenato Botelho <garga@FreeBSD.org>2014-12-16 11:28:39 -0200
commitd4ea38c5790b319e9417ad468a0b46f9f560e18b (patch)
tree827c5af9a7694f3e5134090a9034dbfce874031b /usr
parent936e554bab69b0f6b1eb53cae807e3f2fafa3e73 (diff)
downloadpfsense-d4ea38c5790b319e9417ad468a0b46f9f560e18b.zip
pfsense-d4ea38c5790b319e9417ad468a0b46f9f560e18b.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')
-rw-r--r--usr/local/www/widgets/widgets/gateways.widget.php4
-rw-r--r--usr/local/www/widgets/widgets/interfaces.widget.php6
-rw-r--r--usr/local/www/widgets/widgets/ntp_status.widget.php10
-rw-r--r--usr/local/www/widgets/widgets/openvpn.widget.php6
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>
OpenPOWER on IntegriCloud