diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-07-27 03:50:05 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-07-27 03:50:05 +0000 |
commit | 76cd0d8938a31f69829d7384b7d3c86a12692a30 (patch) | |
tree | 7ebdf8cac93f678e93af2be990eb85311722182a /usr | |
parent | d1329286b4c916e4a3780334cde50e8209efc702 (diff) | |
download | pfsense-76cd0d8938a31f69829d7384b7d3c86a12692a30.zip pfsense-76cd0d8938a31f69829d7384b7d3c86a12692a30.tar.gz |
Add inline print style css output code and switch nifty to it.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/guiconfig.inc | 14 | ||||
-rwxr-xr-x | usr/local/www/head.inc | 16 |
2 files changed, 21 insertions, 9 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 271e017..cda5e0e 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -813,6 +813,20 @@ function outputJavaScriptFileInline($javascript) { } + +function outputCSSPrintFileInline($css) { + if(file_exists($css)) { + echo "\n<style media=\"print\" type=\"text/css\">\n"; + include($css); + echo "\n</style>\n"; + } else { + echo "<p/>ERROR! COULD NOT LOCATE $css"; + echo "<p/>Please contact webmaster."; + exit; + } +} + + function outputCSSFileInline($css) { if(file_exists($css)) { echo "\n<style type=\"text/css\">\n"; diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index 7af1867..b6386f9 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -23,15 +23,13 @@ $pagetitle = gentitle( $pgtitle ); <?php else: ?> <link rel="stylesheet" href="/themes/<?php echo $g['theme']; ?>/all.css" media="all" /> <?php endif; ?> - - <?php outputCSSFileInline("niftycssCode.css"); ?> - <link rel="stylesheet" type="text/css" href="niftycssprintCode.css" media="print"> - <?php outputJavaScriptFileInline("niftyjsCode.js"); ?> - <script type="text/javascript"> - var theme = "<?php echo $g['theme']; ?>"; - </script> - <?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?> - + <?php outputCSSFileInline("niftycssCode.css"); ?> + <?php outputCSSPrintFileInline("niftycssprintCode.css"); ?> + <?php outputJavaScriptFileInline("niftyjsCode.js"); ?> + <script type="text/javascript"> + var theme = "<?php echo $g['theme']; ?>"; + </script> + <?php outputJavaScriptFileInline("themes/{$g['theme']}/loader.js"); ?> <? /* |