diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index c3484bf7c..957e5fdb9 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -124,22 +124,32 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo ''."\n"; echo ''."\n"; if($this->footerjs) { - echo ""; + $jscode .= "});\n"; + $hashjs = md5($jscode); + if(!is_dir($this->params['cachedir'].'/js')) { + SeedDMS_Core_File::makeDir($this->params['cachedir'].'/js'); + } + if(is_dir($this->params['cachedir'].'/js')) { + file_put_contents($this->params['cachedir'].'/js/'.$hashjs.'.js', $jscode); + } + echo ''."\n"; } if(method_exists($this, 'js')) echo ''."\n"; echo "\n\n"; } /* }}} */ + function footerjs() { /* {{{ */ + header('Content-Type: application/javascript'); + if(file_exists($this->params['cachedir'].'/js/'.$_GET['hash'].'.js')) { + readfile($this->params['cachedir'].'/js/'.$_GET['hash'].'.js'); + } + } /* }}} */ + function missingḺanguageKeys() { /* {{{ */ global $MISSING_LANG, $LANG; if($MISSING_LANG) {