1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Issue #2572 Inline CSS with Cached CSS Files.

This commit is contained in:
Cameron
2017-04-15 09:03:13 -07:00
parent 4f45805bc7
commit 45230488e3

View File

@@ -1493,6 +1493,11 @@ class e_jsmanager
else else
{ {
echo "<link type='text/css' href='".e_WEB_ABS."cache/".$fileName."' rel='stylesheet' property='stylesheet' />\n\n"; echo "<link type='text/css' href='".e_WEB_ABS."cache/".$fileName."' rel='stylesheet' property='stylesheet' />\n\n";
if(!empty($this->_cache_list['css_inline']))
{
echo $this->_cache_list['css_inline'];
unset($this->_cache_list['css_inline']);
}
} }
// Remove from list, anything we have added. // Remove from list, anything we have added.
@@ -1716,14 +1721,26 @@ class e_jsmanager
break; break;
case 'css': case 'css':
$text = '';
if($label && E107_DEBUG_LEVEL > 0) if($label && E107_DEBUG_LEVEL > 0)
{ {
echo "<!-- [CSSManager] ".$label." -->\n"; $text .= "<!-- [CSSManager] ".$label." -->\n";
} }
echo '<style rel="stylesheet" type="text/css" property="stylesheet">'; $text .= '<style rel="stylesheet" type="text/css" property="stylesheet">';
echo implode("\n\n", $content_array); $text .= implode("\n\n", $content_array);
echo '</style>'; $text .= '</style>';
echo "\n"; $text .= "\n";
if($this->_cache_enabled != true)
{
echo $text;
}
else
{
$this->_cache_list['css_inline'] = $text;
}
break; break;
} }
} }