includes/template.php
changeset 1047 d996bb6d6e74
parent 1046 cfc6c30c5e2d
child 1048 7b9132bfb5ce
equal deleted inserted replaced
1046:cfc6c30c5e2d 1047:d996bb6d6e74
   547     // these depend heavily on whether we have a CDN to work with or not
   547     // these depend heavily on whether we have a CDN to work with or not
   548     if ( getConfig('cdn_path') )
   548     if ( getConfig('cdn_path') )
   549     {
   549     {
   550       // we're on a CDN, point to static includes
   550       // we're on a CDN, point to static includes
   551       // CLI javascript compression script: includes/clientside/jscompress.php
   551       // CLI javascript compression script: includes/clientside/jscompress.php
   552       $js_head = '<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/enano-lib-basic.js"></script>';
   552       $js_head = '';
   553       
   553       
   554       if ( !empty($this->js_preload) )
   554       if ( !empty($this->js_preload) )
   555       {
   555       {
   556         $loadlines = array();
   556         $loadlines = array();
   557         
   557         
   579         $js_head .= "\n    <script type=\"text/javascript\">
   579         $js_head .= "\n    <script type=\"text/javascript\">
   580       var loaded_components = loaded_components || {};
   580       var loaded_components = loaded_components || {};
   581       $loadlines
   581       $loadlines
   582     </script>";
   582     </script>";
   583       }
   583       }
       
   584       
       
   585       $js_head .= '<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/enano-lib-basic.js"></script>';
   584       
   586       
   585       $js_foot = <<<JSEOF
   587       $js_foot = <<<JSEOF
   586     <script type="text/javascript">
   588     <script type="text/javascript">
   587       // This initializes the Javascript runtime when the DOM is ready - not when the page is
   589       // This initializes the Javascript runtime when the DOM is ready - not when the page is
   588       // done loading, because enano-lib-basic still has to load some 15 other script files
   590       // done loading, because enano-lib-basic still has to load some 15 other script files