Disabled option for Minifying CSS and JavaScript. (not currently supported)
This commit is contained in:
parent
c1df2653a8
commit
bba4301bfa
@ -263,7 +263,8 @@ class Page {
|
||||
* PLEASE: Ensure that you test your site out throughly after enabling this module!
|
||||
* Either that, or don't use this module unless you are sure of what it is doing.
|
||||
*
|
||||
* TODO: For performance reasons: Before performing the regex's, compute the md5 of the CSS & JS files and store somewhere to check later.
|
||||
* TODO: Add support for minify-ing CSS and Javascript files. (similar to Minify. See: http://code.google.com/p/minify/ or https://github.com/mrclay/minify)
|
||||
* TODO: For performance reasons: Before performing the regex's, compute the md5 of the CSS & JS files and store somewhere to check later.
|
||||
*
|
||||
* @return
|
||||
* This function returns FALSE if it failed to cache the files,
|
||||
@ -325,6 +326,7 @@ class Page {
|
||||
// Minify the CSS if enabled.
|
||||
if ($config->get_bool("autocache_min_css")){
|
||||
// not supported yet.
|
||||
// TODO: add support for Minifying CSS files.
|
||||
}
|
||||
|
||||
// compute the MD5 sum of the concatenated CSS files
|
||||
@ -375,6 +377,7 @@ class Page {
|
||||
// Minify the JS if enabled.
|
||||
if ($config->get_bool("autocache_min_js")){
|
||||
// not supported yet.
|
||||
// TODO: add support for Minifying CSS files.
|
||||
}
|
||||
|
||||
// compute the MD5 sum of the concatenated JavaScript files
|
||||
|
@ -287,11 +287,27 @@ class Setup extends SimpleExtension {
|
||||
$sb->add_text_option("api_recaptcha_pubkey", "<br>Public key: ");
|
||||
$event->panel->add_block($sb);
|
||||
|
||||
|
||||
// Options for Automatic Caching & Minifying
|
||||
$minifyscript = "<script language='javascript'>
|
||||
checkbox_css = document.getElementById('autocache_min_css');
|
||||
checkbox_js = document.getElementById('autocache_min_js');
|
||||
|
||||
checkbox_css.disabled = true;
|
||||
checkbox_js.disabled = true;
|
||||
|
||||
$(document).ready(function() {
|
||||
checkbox_css.disabled = true;
|
||||
checkbox_js.disabled = true;
|
||||
});
|
||||
</script>";
|
||||
|
||||
$sb = new SetupBlock("Automatic Caching of CSS & JS");
|
||||
$sb->add_text_option("autocache_location", "Location: ");
|
||||
$sb->add_label("<br><i>This location needs to be writeable by the webserver.</i>");
|
||||
$sb->add_bool_option("autocache_css", "<br>Automatic caching of CSS: ");
|
||||
$sb->add_bool_option("autocache_js", "<br>Automatic caching of JS: ");
|
||||
$sb->add_label("<span id='autocache_minify'>Minifying currently not supported.</span>$minifyscript");
|
||||
$sb->add_bool_option("autocache_min_css", "<br>Minimize CSS files: ");
|
||||
$sb->add_bool_option("autocache_min_js", "<br>Minimize JS files: ");
|
||||
$event->panel->add_block($sb);
|
||||
|
Loading…
x
Reference in New Issue
Block a user