summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-07-23 16:32:29 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-07-23 16:32:29 +0000
commit06a9dc5aa4c32f0f1e626bf0d6ab798652ed8015 (patch)
tree99da3801083c3d015e4a2d8588cd1e19cd19853d /usr
parent32dab50e76b6a2b742e2e71855248f532c11c696 (diff)
downloadpfsense-06a9dc5aa4c32f0f1e626bf0d6ab798652ed8015.zip
pfsense-06a9dc5aa4c32f0f1e626bf0d6ab798652ed8015.tar.gz
Move Inline CSS and JS functions to guiconfig.inc.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/guiconfig.inc31
1 files changed, 30 insertions, 1 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index acb3c1f..c76fdc4 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -797,4 +797,33 @@ function display_widget_tabs(& $tab_array) {
echo "</div>";
}
-?>
+
+// Return inline javascript file or CSS to minimizie
+// request count going back to server.
+function outputJavaScriptFileInline($javascript) {
+ if(file_exists($javascript)) {
+ echo "<script type=\"text/javascript\">";
+ include($javascript);
+ echo "</script>";
+ } else {
+ echo "<p/>ERROR! COULD NOT LOCATE $javascript";
+ echo "<p/>Please contact webmaster.";
+ exit;
+ }
+}
+
+
+function outputCSSFileInline($css) {
+ if(file_exists($css)) {
+ echo "<style type=\"text/css\">";
+ include($css);
+ echo "</style>";
+ } else {
+ echo "<p/>ERROR! COULD NOT LOCATE $css";
+ echo "<p/>Please contact webmaster.";
+ exit;
+ }
+}
+
+
+?> \ No newline at end of file
OpenPOWER on IntegriCloud