includes/template.php
changeset 1220 fbfd6c852c89
parent 1203 c6587072e4c4
child 1227 bdac73ed481e
equal deleted inserted replaced
1219:2b13cd6b4f95 1220:fbfd6c852c89
   579       $js_head = '';
   579       $js_head = '';
   580       
   580       
   581       // point to jsres compressor
   581       // point to jsres compressor
   582       $js_head .= <<<JSEOF
   582       $js_head .= <<<JSEOF
   583       <!-- Only load a basic set of functions for now. Let the rest of the API load when the page is finished. -->
   583       <!-- Only load a basic set of functions for now. Let the rest of the API load when the page is finished. -->
   584       <script type="text/javascript" src="$cdnpath/includes/clientside/jsres.php?early&$enano_version"></script>
   584       <script type="text/javascript" src="$cdnpath/includes/clientside/jsres.php?early&amp;$enano_version"></script>
   585 JSEOF;
   585 JSEOF;
   586       $js_foot = '';
   586       $js_foot = '';
   587       
   587       
   588       if ( !empty($this->js_preload) )
   588       if ( !empty($this->js_preload) )
   589       {
   589       {
   594         $this->js_preload = array_unique($this->js_preload);
   594         $this->js_preload = array_unique($this->js_preload);
   595         if ( in_array('l10n.js', $this->js_preload) )
   595         if ( in_array('l10n.js', $this->js_preload) )
   596         {
   596         {
   597           // special case for l10n: also load strings
   597           // special case for l10n: also load strings
   598           global $lang;
   598           global $lang;
   599           $js_foot .= "\n    <script type=\"text/javascript\" src=\"" . makeUrlNS("Special", "LangExportJSON/$lang->lang_id", $enano_version) . "\"></script>";
   599           $js_foot .= "\n    <script type=\"text/javascript\" src=\"" . makeUrlNS("Special", "LangExportJSON/$lang->lang_id", $enano_version, true) . "\"></script>";
   600         }
   600         }
   601         $scripts = implode(',', $this->js_preload);
   601         $scripts = implode(',', $this->js_preload);
   602         $js_foot .= "\n    <script type=\"text/javascript\" src=\"" . cdnPath . "/includes/clientside/jsres.php?f=$scripts&$enano_version\"></script>";
   602         $js_foot .= "\n    <script type=\"text/javascript\" src=\"" . cdnPath . "/includes/clientside/jsres.php?f=$scripts&amp;$enano_version\"></script>";
   603         
   603         
   604       }
   604       }
   605       
   605       
   606       $js_foot .= <<<JSEOF
   606       $js_foot .= <<<JSEOF
   607     <!-- jsres.php is a wrapper script that compresses and caches single JS files to minimize requests -->
   607     <!-- jsres.php is a wrapper script that compresses and caches single JS files to minimize requests -->