49 Commits

Author SHA1 Message Date
Andrew Nicols
0e9911e143 MDL-59148 theme: Use fallback if compiled version unavailable 2017-06-28 18:24:50 +02:00
Simey Lameze
3b9b47312c MDL-59148 core: save css file totemp directory
Save a copy of the css file on the temp directory
to be used as a fallback when waiting for a theme to be compiled
and is not versioned in any way.
2017-06-28 18:24:49 +02:00
Ryan Wyllie
5dd40ec4b4 MDL-59123 admin: add cli script to compile theme CSS
Added a script to selectively compile theme CSS. In order to allow
compiling on per theme basis without purging all theme CSS in the
local cache I have made some changes to how CSS is compiled and
how it is accessed via local cache.
2017-06-27 06:48:45 +00:00
Jake Dallimore
bb931788cc Merge branch 'MDL-59142-master' of git://github.com/lameze/moodle 2017-06-14 12:38:11 +01:00
Simey Lameze
4cc2f33b08 MDL-59142 core_theme: cache post-processed css
Thanks Cameron Ball for the base patch
2017-06-13 09:35:35 +08:00
Andrew Nicols
d0f6660b98 MDL-59154 theme: Lock for all caching builds
The previous behaviour was to only lock when in theme designer mode.
As a result, when generating the theme for after a reset, each new
client was starting the generation afresh and no locking was taking
place at all.
2017-06-08 11:49:50 +08:00
Frederic Massart
1d987cae5f MDL-55224 output: Support automatic flipping to RTL styles
Part of MDL-55071
2016-09-23 10:49:49 +01:00
Frederic Massart
65b8336ed3 MDL-55286 theme: Support compiling SCSS on-demand from a theme
Part of MDL-55071
2016-09-23 10:49:49 +01:00
Frederic Massart
034dbd7588 MDL-45084 theme: File was not chunked on IE
This only applied when themedesignermode was disabled, because the
first chunk is 0, but 0 is resolved to false. We needed to compare
$chunk with null in order to know if it was set.
2014-04-14 16:25:20 +08:00
Frederic Massart
d433cf37cd MDL-44357 theme: Allow core to compile LESS in PHP 2014-03-24 15:15:03 +08:00
Petr Škoda
98245a84a2 MDL-44358 simplify CSS processing
The affected code areas are not supposed to be used in any add-ons,
the backwards compatibility should not be a concern for us.
2014-02-28 14:50:10 +08:00
Petr Škoda
cb8108dd22 MDL-40545 convert js and theme resources to localcachedir 2013-07-20 14:10:25 +02:00
Petr Škoda
ef201c966f MDL-40563 use revisions for theme css cache files and fix potential race condition 2013-07-12 23:25:00 +02:00
Sam Hemelryk
1eb2b51703 MDL-39212 css: we now chunk and no longer separate 2013-06-28 16:49:02 +12:00
Petr Škoda
574909efce MDL-39174 fix phpdocs packages in themes 2013-04-27 13:22:59 +02:00
Sam Hemelryk
c31978b8ff MDL-39326 css: removed unused chunk array search 2013-04-24 14:02:57 +12:00
Sam Hemelryk
13b0140a87 MDL-39326 css: no passed the no svg key to chunking when required 2013-04-24 14:02:52 +12:00
Sam Hemelryk
e10750279d MDL-38441 css: implemented chunking of large sheets 2013-04-19 10:09:45 +12:00
Sam Hemelryk
383b89a1e2 MDL-36888 theme: allow the use of SVG in CSS background images. 2012-12-03 09:20:06 +13:00
Petr Skoda
979d320722 MDL-32825 try to improve atomicity of cache file operations in themes and javascript 2012-05-07 18:45:13 +02:00
Petr Skoda
869b12554d MDL-32683 minor css related refactoring 2012-05-05 18:46:00 +02:00
Petr Skoda
2c61e7cc4a MDL-32683 fine tune theme style sheet caching 2012-05-05 17:06:58 +02:00
Petr Skoda
7070b7f261 MDL-32683 use slashargument urls for theme style sheets 2012-05-05 15:26:24 +02:00
Petr Skoda
8c672cf9f3 MDL-32683 explicitly allow more caching of static content 2012-05-05 14:09:31 +02:00
Rajesh Taneja
7e08c95fd8 MDL-31529 csslib: third param passed to css_store_css fixed 2012-02-13 10:23:51 +08:00
Sam Hemelryk
0e641c7437 MDL-29941 csslib: A CSS optimiser has been added to process our mountain of CSS 2012-01-20 11:02:05 +08:00
Aparup Banerjee
3a9e6be55a Merge branch 'w46_MDL-30349_m22_filestatcaching' of git://github.com/skodak/moodle 2011-11-22 11:33:55 +08:00
Petr Skoda
e164a0dfea MDL-30349 clear file stat cache when adding new theme cache files
Hopefully this will resolve some cache reset problems.
2011-11-19 12:14:26 +01:00
Petr Skoda
c198390a49 MDL-30294 prevent notices and errors in theme files content
Theme images, css and JS are broken by PHP error messages which creates major problems for production sites with enabled displaying of errors because the files are cached indefinitely. It is better to send the errors and notices to logs only, in any case all developers must learn to use error logs.
2011-11-19 11:23:28 +01:00
Tom Lanyon
365bec4c06 MDL-28701 Change all uses of $CFG->dataroot/cache to $CFG->cachedir 2011-09-10 10:35:46 +02:00
Petr Skoda
aa603b14c7 MDL-28709 adding HTTP_IF_MODIFIED_SINCE and minor style tweaks 2011-08-19 16:32:30 +02:00
Tony Levi
ccc0fff941 MDL-28709: Performance: Send cache/contenttype headers with 304 responses 2011-08-19 16:23:08 +02:00
Petr Skoda
e1c2a211f2 MDL-28147 do not double cache theme css/js 2011-07-04 11:29:23 +02:00
Petr Skoda
8a7703ce53 MDL-25973 add missing charset 2011-01-14 09:32:17 +01:00
Sam Hemelryk
71be124d02 themes MDL-22247 Fixed up broken editor_sheets for themes 2010-10-01 01:43:06 +00:00
Petr Skoda
c426ef3aa5 MDL-23984 improvements of check_dir_exists() - replacing by make_upload_directory() in cases where we want to be sure that the dir is writable; removning now default create and recursive params to make code easier to read 2010-08-29 14:51:09 +00:00
Sam Hemelryk
2b8f39c473 theme MDL-21435 Fixed incorrect number of arguments for store_css with editor css 2010-06-24 08:31:19 +00:00
Sam Hemelryk
045f492c6b javascript-minify MDL-21435 Added Minify third party lib and integrated to with JavaScript and CSS serving 2010-05-19 02:15:16 +00:00
Petr Skoda
e10f304d19 MDL-21252 home-grown CSS minimisation 2010-01-05 21:45:51 +00:00
Petr Skoda
7c986f04e3 MDL-21241 theme CSS and JS gzip compression + some more fixes 2010-01-05 20:18:15 +00:00
Petr Skoda
c724f835ca MDL-21242 moving yui2 skin away from theme CSS, this improves browser caching and finally we may load skin from the internet too 2010-01-05 17:29:43 +00:00
Petr Skoda
9b2735f93c MDL-21188 removing support for yui pix folders in themes because it is not compatible with autoloading in YUI3 and also loading of any YUI from external sites through combo scripts 2009-12-25 14:14:55 +00:00
Petr Skoda
73e504bca9 MDL-20799 renewed support for alternative theme dir location 2009-12-23 18:52:42 +00:00
Petr Skoda
78946b9bdb MDL-20204 first batch of major theme changes, some regressions are still there, expect more changes and improvements soon; see tracker for details and list of subtasks 2009-12-16 18:00:58 +00:00
Petr Skoda
aa6c1ced0a MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-04 08:11:02 +00:00
tjhunt
1a192cf031 themes: MDL-20013 pluging sheets were not handled correct. Problem found and fixed thanks to Mark Johnson. 2009-08-08 08:10:59 +00:00
moodler
4042788347 theme/styles MDL-19953 $THEME->csslifetime lets themers adjust the cacheability of their theme in seconds.
Also:

 1) In dev mode, caching is 60 seconds all the time.
 2) Standard theme always has a long 2 days
2009-07-29 08:12:48 +00:00
tjhunt
fdeb7fa192 themes: MDL-19077 - more work on the theme_config class.
* Writing lots more PHPdoc comments for all the settings.
* Strip the comments from the standard theme config.php (see below)
* Move finding the layout template from moodle_core_renderer to the theme_config class
* Move loading meta.php files from moodle_core_renderer to the theme_config class
* MDL-19719 Remove support for $THEME->langsheets, and lang/.../styles.php
* MDL-19719 Put the Vietnamese-specific code into the standard theme
* Support for styles.php in all plugin types (at the theme's discretion). (c/f MDL-16438)
* More PHP doc comments for moodle_core_renderer methods.

About stripping comments from config.php: I'm not sure if this
is a good idea, and I may revert this bit. I am hoping that once
http://phpdocs.moodle.org/HEAD/moodlecore/theme_config.html has
been updated, that will be better than copying and pasting these
comments into every theme. I intend to post in the themes forum
to canvas opinions.
2009-07-07 05:05:06 +00:00
tjhunt
b70094743a themes: MDL-19077 change how the theme is initialised and CSS is served.
This is part of http://docs.moodle.org/en/Development:Theme_engines_for_Moodle%3F

$THEME is now initialised at the same time as $OUTPUT. Old functions like
theme_setup are deprecated in favour of methods on $PAGE. There is a new
theme_config class in outputlib.php that deals with loading the theme config.php file.

CSS used to be served by themes styles.php files calling a function in weblib.php.
Now it works by each theme's styles.php file doing
$themename = basename(dirname(__FILE__));
require_once(dirname(__FILE__) . '/../../theme/styles.php');
which is less code to be copied into each theme. (Old-style styles.php files still
work thanks to some code in deprecatedlib.php.)

Admin UI for choosing a theme cleaned up.

A couple of theme-specific hard-coded hacks like $THEME->cssconstants and
$THEME->CSSEdit have been replaced by a more generic $THEME->customcssoutputfunction
hook. See examples at the end of outputlib.php

Also:
* Fix setting the theme in the URL, which seems to have been broken since 1.9.
* Fix up errors on a few pages caused by the new initialisation order.
* MDL-19097 moodle_page::set_course should not set $COURSE unless it is $PAGE.
* httpsrequired() from moodlelib.php moved to $PAGE->https_required().
* Move has_started() method to the renderer base class.
* Further fixes to display of early errors.
* Remove print_header/footer_old from weblib. I did not mean to commit them before.
2009-07-01 05:54:26 +00:00