Add an option $CFG->CSSEdit or $THEME->CSSEdit to Moodle. If one of both is set to true, Moodle does not write all CSS code in one single CSS file but adds CSS @include to the theme CSS file to load all single CSS files. These single CSS files can then be interactively edited and saved with CSSEdit. It's like Firebug with direct saving your changes.

This commit is contained in:
urs_hunkler
2007-06-23 12:21:59 +00:00
parent ccac7305ea
commit d0c92410ef
+16 -4
View File
@@ -2920,10 +2920,22 @@ function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $force
echo replace_cssconstants($css);
} else {
/// Actually output all the files in order.
foreach ($files as $file) {
echo '/***** '.$file[1].' start *****/'."\n\n";
@include_once($file[0].'/'.$file[1]);
echo '/***** '.$file[1].' end *****/'."\n\n";
if (empty($CFG->CSSEdit) && empty($THEME->CSSEdit)) {
foreach ($files as $file) {
echo '/***** '.$file[1].' start *****/'."\n\n";
@include_once($file[0].'/'.$file[1]);
echo '/***** '.$file[1].' end *****/'."\n\n";
}
} else {
foreach ($files as $file) {
echo '/* @group '.$file[1].' */'."\n\n";
if (strstr($file[1], '.css') !== FALSE) {
echo '@import url("'.$CFG->themewww.'/'.$file[1].'");'."\n\n";
} else {
@include_once($file[0].'/'.$file[1]);
}
echo '/* @end */'."\n\n";
}
}
}
}