summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2010-02-07 15:22:32 -0500
committerScott Ullrich <sullrich@pfSense.org>2010-02-07 15:22:32 -0500
commit838fa668b965233eac4b780fc28451ac5aa1ad6d (patch)
tree28f48d627e16225b9fcabea7b0e209f81fecb1f7 /usr/local/www
parent2494295a68cec082d335ee464beb67233042586a (diff)
downloadpfsense-838fa668b965233eac4b780fc28451ac5aa1ad6d.zip
pfsense-838fa668b965233eac4b780fc28451ac5aa1ad6d.tar.gz
Link to javascript file instea of including it on every request saving WAN bandwidth
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/index.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index b03d4f0..77cfaaa 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -696,7 +696,8 @@ echo $jscriptstr;
domTT_activate('welcome1', null, 'x', 287, 'y', 107, 'content', document.getElementById('welcome-container'), 'type', 'sticky', 'closeLink', '','delay', 1000, 'fade', 'both', 'fadeMax', 100, 'styleClass', 'niceTitle');
<?php } ?>
});
- <?php
+</script>
+<?php
//build list of javascript include files
$jsincludefiles = array();
$directory = "widgets/javascript/";
@@ -707,10 +708,10 @@ echo $jscriptstr;
}
foreach($jsincludefiles as $jsincludename) {
if(!stristr($jsincludename, ".js"))
- continue;
- include($directory . $jsincludename);
+ continue;
+ echo "<script src='{$directory}{$jsincludename}' type='text/javascript'></script>\n";
}
- ?>
+?>
</script>
</form>
</body>
OpenPOWER on IntegriCloud