diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index 89a9ed3..38161a9 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -79,6 +79,13 @@ class DocumentationViewer extends Controller */ private static $edit_links = array(); + /** + * Determines whether css and js files are injected into the document. + * + * @var bool + */ + private static $apply_default_theme = true; + /** * */ @@ -89,21 +96,24 @@ class DocumentationViewer extends Controller if (!$this->canView()) { return Security::permissionFailure($this); } - Requirements::javascript('//use.typekit.net/emt4dhq.js'); - Requirements::customScript('try{Typekit.load();}catch(e){}'); - Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js'); - Requirements::javascript('https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js'); + if ($this->config()->apply_default_theme) { + Requirements::javascript('//use.typekit.net/emt4dhq.js'); + Requirements::customScript('try{Typekit.load();}catch(e){}'); - Requirements::javascript(DOCSVIEWER_DIR .'/javascript/DocumentationViewer.js'); - Requirements::combine_files('docs.css', array( - DOCSVIEWER_DIR .'/css/normalize.css', - DOCSVIEWER_DIR .'/css/utilities.css', - DOCSVIEWER_DIR .'/css/typography.css', - DOCSVIEWER_DIR .'/css/forms.css', - DOCSVIEWER_DIR .'/css/layout.css', - DOCSVIEWER_DIR .'/css/small.css' - )); + Requirements::javascript(THIRDPARTY_DIR .'/jquery/jquery.js'); + Requirements::javascript('https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js'); + + Requirements::javascript(DOCSVIEWER_DIR .'/javascript/DocumentationViewer.js'); + Requirements::combine_files('docs.css', array( + DOCSVIEWER_DIR .'/css/normalize.css', + DOCSVIEWER_DIR .'/css/utilities.css', + DOCSVIEWER_DIR .'/css/typography.css', + DOCSVIEWER_DIR .'/css/forms.css', + DOCSVIEWER_DIR .'/css/layout.css', + DOCSVIEWER_DIR .'/css/small.css' + )); + } } /**