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:
@@ -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.
|
||||||
@@ -1629,7 +1634,7 @@ class e_jsmanager
|
|||||||
/* remove tabs, spaces, newlines, etc. */
|
/* remove tabs, spaces, newlines, etc. */
|
||||||
$minify = str_replace( array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $minify );
|
$minify = str_replace( array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $minify );
|
||||||
$minify = str_replace("}","} ",$minify);
|
$minify = str_replace("}","} ",$minify);
|
||||||
|
|
||||||
return $minify;
|
return $minify;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user