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 "