mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Issue #3104 Library CSS fix for late calls. (eg. bootstrap-switch )
This commit is contained in:
@@ -367,6 +367,14 @@ echo "</body></html>";
|
|||||||
// SecretR - EXPERIMENT! SEND CSS data to header. Performance tests in progress.
|
// SecretR - EXPERIMENT! SEND CSS data to header. Performance tests in progress.
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
$e_js = e107::getJs();
|
$e_js = e107::getJs();
|
||||||
|
|
||||||
|
$tmp0 = $e_js->renderJs('library_css', false, 'css', true);
|
||||||
|
if($tmp0)
|
||||||
|
{
|
||||||
|
$tmp['search'][] = '<!-- footer_library_css -->';
|
||||||
|
$tmp['replace'][] = $tmp0;
|
||||||
|
}
|
||||||
|
|
||||||
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility
|
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility
|
||||||
$tmp1 = $e_js->renderJs('other_css', false, 'css', true);
|
$tmp1 = $e_js->renderJs('other_css', false, 'css', true);
|
||||||
if($tmp1)
|
if($tmp1)
|
||||||
|
@@ -271,6 +271,7 @@ unset($e_headers);
|
|||||||
echo "\n<!-- Library CSS -->\n";
|
echo "\n<!-- Library CSS -->\n";
|
||||||
|
|
||||||
$e_js->renderJs('library_css', false, 'css', false);
|
$e_js->renderJs('library_css', false, 'css', false);
|
||||||
|
echo "\n<!-- footer_library_css -->\n"; // substituted in footer when detected.
|
||||||
|
|
||||||
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility
|
// Other CSS - from unknown location, different from core/theme/plugin location or backward compatibility
|
||||||
$e_js->renderJs('other_css', false, 'css', false);
|
$e_js->renderJs('other_css', false, 'css', false);
|
||||||
|
@@ -305,7 +305,7 @@ if(deftrue('e_DEVELOPER'))
|
|||||||
{
|
{
|
||||||
echo "\n\n<!-- ======= [JSManager] FOOTER: Remaining CSS ======= -->";
|
echo "\n\n<!-- ======= [JSManager] FOOTER: Remaining CSS ======= -->";
|
||||||
}
|
}
|
||||||
$CSSORDER = deftrue('CSSORDER') ? explode(",",CSSORDER) : array('other','core','plugin','theme'); // INLINE CSS in Body not supported by HTML5. .
|
$CSSORDER = deftrue('CSSORDER') ? explode(",",CSSORDER) : array('library','other','core','plugin','theme'); // INLINE CSS in Body not supported by HTML5. .
|
||||||
|
|
||||||
foreach($CSSORDER as $val)
|
foreach($CSSORDER as $val)
|
||||||
{
|
{
|
||||||
|
@@ -979,6 +979,7 @@ class e_jsmanager
|
|||||||
|
|
||||||
case 'library_css':
|
case 'library_css':
|
||||||
$file_path = $runtime_location.$this->_sep.$tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
$file_path = $runtime_location.$this->_sep.$tp->createConstants($file_path, 'mix').$this->_sep.$pre.$this->_sep.$post;
|
||||||
|
// e107::getDebug()->log($file_path);
|
||||||
if(!isset($this->_e_css['library'])) $this->_e_css['library'] = array();
|
if(!isset($this->_e_css['library'])) $this->_e_css['library'] = array();
|
||||||
$registry = &$this->_e_css['library'];
|
$registry = &$this->_e_css['library'];
|
||||||
$runtime = true;
|
$runtime = true;
|
||||||
|
Reference in New Issue
Block a user