95 Commits

Author SHA1 Message Date
tjhunt
d4a03c00ea themes & blocks - MDL-19077 & MDL-19010 blocks are now printed by the theme
The code to print blocks in now in theme layout.php files. (Or in
moodle_core_renderer::handle_legacy_theme)

Code for printing blocks everywhere else has been stripped out.
(Total diffstat 1225 insertions, 2019 deletions)

The way the HTML for a block instance is generated has been cleaned
up a lot. Now, the block_instance generates a block_contents
object which gives a structured representation of the block,
and then $OUTPUT->block builds all the HTML from that.

How theme config.php files specify the layout template and block
regions by page general type has been changed to be even more flexible.

Further refinement for how the theme and block code gets initialised.

Ability for scrits to add 'pretend blocks' to the page. That is,
things that look like blocks, but are not normal block_instances.
(Like the add a new block UI.)

Things that are still broken:
 * some pages in lesson, quiz and resource. I'm working on it.
 * lots of developer debug notices pointing out things that
   need to be updated.
2009-07-09 07:35:03 +00:00
tjhunt
793a204e7b themes MDL-19077: Update deprecated stuff in all theme config.php files. 2009-07-09 02:06:22 +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
tjhunt
a5cb8d6987 MDL-19077 - Finish eliminating customcorners-specific code in core.
The custom-corners-specific code now in theme/customcornser/renderers.php
and lib/deprecatedlib.php.

Also, $CFG->pixpath is now causing more problems than ever. If it is
giving your problems, please call $OUTPUT->initialise_deprecated_cfg_pixpath()
as a temporary fix. As you can imagine, we are thinking about a better
long-term fix, which is why that method as a silly, and easy to grep name.
2009-06-29 08:17:31 +00:00
tjhunt
c84a2dbea2 MDL-19077 - change how $OUTPUT is initialised.
Please read the comment at the top of bootstrap_renderer in setuplib.php
2009-06-29 05:00:45 +00:00
fmarier
316914bf6e MDL-17037 ran all GIF images through gifsicle and PNG through optipng 2009-04-05 23:33:00 +00:00
Francois Marier
6280ef3e58 Fix CVS-git drift (remove some files deleted in CVS) 2009-02-01 23:43:28 +00:00
fmarier
6a77823cb6 MDL-17037 Lossless optimization of all PNG and JPEG images 2008-10-28 01:50:10 +00:00
skodak
a78bee285d MDL-16433 themes and javascript files are not blocked by running upgrade anymore 2008-09-14 08:40:23 +00:00
Francois Marier
6800d78e06 Drift between CVS and git
- large deletions
- lucene updates
- error() => print_error()
- NO_MOODLE_COOKIES define
- various other things
2008-06-25 17:31:23 +00:00
sam_marshall
03beb65b3a MDL-14476: Made 'fake blocks' in calendar and elsewhere more consistent with real blocks (so styling themes is easier) 2008-04-22 14:14:47 +00:00
sam_marshall
a41b301703 MDL-14260: Changed print_heading_with_help so that the help button is outside the heading (for accessibility reasons) and changed themes so that this makes no visual difference. 2008-04-08 16:10:49 +00:00
urs_hunkler
c4edeb6ffc merged form 1.9 :: MDL-13700 :: added fontsizes for tag clouds 2008-02-27 18:41:18 +00:00
urs_hunkler
b85104e3d3 merged from 1.9 :: MDL-13648 :: removed the chameleon settings 2008-02-27 12:09:00 +00:00
urs_hunkler
2edd389b7d merged from 1.9 :: MDL-13648 :: several enhancements/changes due to the discussion in the Moodle tracker:
_ changed the README - Custom corners is now experimental
_ styles_colors from standard included - all the usabilty work using colors will automatically show up in Custom corners too
_ optimized the JavaScript which adds the necessary layouttable classes to the body tag
_ Chameleon engine removed - developers throw in CSS at the end without caring if the Chameleon engine can handle it
2008-02-27 10:34:51 +00:00
moodler
26b862856c Merged MDL-13685 into head 2008-02-27 05:44:05 +00:00
moodler
cf23a77554 Merged MDL-12248 custom_corners people can now use roles ;-) 2008-02-26 07:16:31 +00:00
urs_hunkler
bd1dcdc82e merged from 1.9 :: MDL-13418, MDL-13422, MDL 13597 :: corrected CSS issues 2008-02-24 21:16:07 +00:00
urs_hunkler
b98a3d78ab merged from 1.9 :: MDL-13453 :: corrected typo 2008-02-24 19:29:31 +00:00
urs_hunkler
6b4f1f73e9 Merged from 1.9 ::
MDL-13444 :: removed the jQuery library and use direct JavaScript instead. That's much faster.
MDL-12078 :: Changed them calles from themewww to httpsthemwww (MDL-12078). MDL-13421 :: corrected left padding in admin block
2008-02-12 21:29:16 +00:00
urs_hunkler
1e2e2ad811 Merged from 1.9 :: Chameleon restrictions info added. 2008-02-03 17:07:59 +00:00
urs_hunkler
b78e33af01 Merged from 1.9 :: MDL-13268 :: CSS cleanup and moved from the end of the file to the other admin CSS definitions 2008-02-03 17:01:18 +00:00
urs_hunkler
1d36e84b4d merged from 1.9 :: MDL-13181 :: added to handle changed xhtml
.glossarypost div.concept h3,
.glossarypost.continuous .concept {
  display: inline;
}
2008-02-03 15:57:35 +00:00
moodler
516b24e3e9 Merged fix for style typo from 1.9 2008-01-22 01:22:16 +00:00
urs_hunkler
fd410ca418 merged from 1.9 :: some CSS cleaning up 2008-01-16 20:05:33 +00:00
urs_hunkler
34d04affe3 new faster jQuery version 2008-01-16 17:22:17 +00:00
urs_hunkler
f6e98e0cfb merged from 1.9 :: MDL-12536 :: changed customtheme call to fixed custom_corners call. 2008-01-16 17:20:24 +00:00
urs_hunkler
f58fcc8234 merged from 1.9 :: MDL-11154 :: added the missing code and the config line and explanation in config.php for flexible columns. 2008-01-12 18:14:49 +00:00
urs_hunkler
ba92d2f50c merged from 1.9 :: MDL-12221 :: removed the "nocoursepage" hack, which was an attempt to find out if a page has a layout-table. I developed this hack because Martin said, that he does not see any chance to implement a layout-table check. This hack followed several exception hacks because Moodel pages are inconsistently created. All those exceptions I could delete too.
Now I added a JavaScript layout-table check which works great.
2008-01-11 09:29:53 +00:00
poltawski
d1a2a97ba3 MDL-12221 - use theme variables so it doesn't break on my setup ;)
merged from MOODLE_19_STABLE
2008-01-10 10:43:35 +00:00
moodler
e93902f856 Merged parenting fix from 1.9 MDL-12221 2008-01-10 06:10:50 +00:00
urs_hunkler
52ea8aa026 Merged from 1.9 and checked :: MDL-12221 :: I added changes to weblib and the forum and glossary view pages, the custom_corners and standard theme to get those pages working.
In the view pages I changed the container function call to a simple "echo 'div ...'" to avoid the custom_corners container overhead and page oddity.

In weblib I added "clearfix" handling to the function "print_box_start($classes ...". "clearfix" is handed over to the containing divs. This is a hack, but I didn't know how to handle it without rewriting too much areas.
2008-01-09 15:52:08 +00:00
nfreear
a377231ec1 MDL-7493 further fix: clean up themes, and remove references to 'hide-show-image' background images. Document smartpix for theming icons in wood and orangewhite readmes. 2007-12-21 11:58:15 +00:00
urs_hunkler
28d10603b5 merged from 1.9 :: CSS cleanups :: collect some background definitions in a basic property and work with cascading to more special definitions. 2007-12-16 09:41:56 +00:00
urs_hunkler
67a6e17071 merged from 1.9 :: MDL-12221 :: Some enhancements to handle the changed boxes - work in progress. 2007-12-13 20:25:24 +00:00
urs_hunkler
f287947552 merged from 1.9 :: MDL-11438 :: added screenshot.jpg to prevent IEs crashing on the them selection page. 2007-12-13 20:21:56 +00:00
urs_hunkler
9ded000995 MDL-12370 :: added missing images 2007-11-28 14:22:38 +00:00
skodak
9f7f1a74a0 MDL-12221 custom themes revisited - implemented container concept; merged from MOODLE_19_STABLE 2007-11-23 16:49:51 +00:00
moodler
b8faa9a7d1 Merged fixes for override colouring MDL-12248 2007-11-19 06:59:19 +00:00
urs_hunkler
e80cc31f06 merged form 1.9 :: MDL-12221 :: new CSS rules for the custom_corners boxes.
And MDL-9306 :: splitted comma sepearted rules to 2 separate rules.
2007-11-16 14:19:13 +00:00
urs_hunkler
3411f1b994 merged from 1.9 :: MDL-12191 :: workaround with JavaScript to add "haslayouttabel" class to body. 2007-11-15 12:21:09 +00:00
urs_hunkler
8e0692399f merged from 1.9 :: changed the form lable look. 2007-11-15 12:18:32 +00:00
urs_hunkler
f72d4df82e merged from 1.9 :: added 2 CSS definitions to dimm the summary and the course no. in a hidden course topic. 2007-11-14 16:06:58 +00:00
urs_hunkler
f632d9f161 merged from 1.9 :: MDL-12093 :: changed function call from get_in_popup to is_in_popup. 2007-11-12 11:40:52 +00:00
urs_hunkler
95014662db merged from 1.9 :: Some theme enhancements while working on MDL-12098 and MDL-11154.Some theme enhancements while working on MDL-12098 and MDL-11154. 2007-11-11 16:04:08 +00:00
nicolasconnault
1ce18c08d3 MDL-9306 Applied Ann's patches: seems to work very well, the output is entirely XHTML compliant, and displays really nicely. 2007-11-06 14:01:13 +00:00
urs_hunkler
7fe1e756c5 merged form 1.9 :: removed a typo: tabletable > table 2007-11-02 10:41:24 +00:00
skodak
ced5ee5921 MDL-11966 implemented dategraded and datesubmitted, tweaked altering of grades depending in hidden grades
MDL-11974 improved gradebook CSS
2007-11-01 08:25:05 +00:00
urs_hunkler
83ad27e3d1 merged from 1.9 :: MDL-11926 :: two comments confused Chameleon. I have deleted the comments and optimized CSS for Chameleon use. 2007-10-28 12:40:39 +00:00
urs_hunkler
34658b8c3e merged from 1.9 2007-10-28 10:19:18 +00:00