From: sam_marshall Date: Tue, 8 Apr 2008 16:10:49 +0000 (+0000) Subject: MDL-14260: Changed print_heading_with_help so that the help button is outside the... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a41b301703084a2cf5d5f8079d87203002725cba;p=moodle.git 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. --- diff --git a/lib/weblib.php b/lib/weblib.php index 2bb44ee8e6..d88ec2dbc0 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3863,10 +3863,10 @@ function print_heading($text, $align='', $size=2, $class='main', $return=false) * @param string $icon Image to display if needed */ function print_heading_with_help($text, $helppage, $module='moodle', $icon='', $return=false) { - $output = ''; - $output .= '

'.$icon.stripslashes_safe($text); + $output = '
'; + $output .= '

'.$icon.stripslashes_safe($text).'

'; $output .= helpbutton($helppage, $text, $module, true, false, '', true); - $output .= '

'; + $output .= ''; if ($return) { return $output; diff --git a/theme/custom_corners/user_styles.css b/theme/custom_corners/user_styles.css index 46182e245e..4bdd853962 100644 --- a/theme/custom_corners/user_styles.css +++ b/theme/custom_corners/user_styles.css @@ -51,6 +51,12 @@ h1.headermain { margin: 0 0 10px 0; font-size: 180%; } +.heading-with-help { + font-size:120%; +} +.heading-with-help h2.main { + font-size:100%; +} h2.main { background-image: url(pix/header.png); background-repeat: repeat-x; diff --git a/theme/formal_white/fw_color.css b/theme/formal_white/fw_color.css index 93f9da6a0d..3986e5108a 100644 --- a/theme/formal_white/fw_color.css +++ b/theme/formal_white/fw_color.css @@ -27,10 +27,14 @@ h1 { color: #333333; } -h2 { +h2,.heading-with-help { background-color: #E3DFD4; border-color:#C6BDA8; } +.heading-with-help h2 { + background:none; + border:none; +} h2.headingblock.header { background: url(pix/grad/gradient_h.jpg); diff --git a/theme/formal_white/fw_fonts.css b/theme/formal_white/fw_fonts.css index 1f1e1035f4..d62a0d1e49 100644 --- a/theme/formal_white/fw_fonts.css +++ b/theme/formal_white/fw_fonts.css @@ -41,9 +41,12 @@ h1 { font-weight: bold; } -h2 { +h2, .heading-with-help { font-size:1.15em; } +.heading-with-help h2 { + font-size:1.0em; +} h3 { font-size:1.1em; } diff --git a/theme/formal_white/fw_layout.css b/theme/formal_white/fw_layout.css index 9fc5d8c76f..2ae185e580 100644 --- a/theme/formal_white/fw_layout.css +++ b/theme/formal_white/fw_layout.css @@ -27,6 +27,13 @@ h2 { padding: 4px; } +.heading-with-help { + text-align:left; + padding:4px 4px 4px 5px; +} +.heading-with-help h2.main { + padding:0; +} h3 { padding: 3px; @@ -48,7 +55,7 @@ border-bottom-width:1px; clear:both; } -h1, h2, h3, th.header { +h1, h2, h3, th.header, .heading-with-help { border-width: 1px; border-style: solid; } diff --git a/theme/metal/fonts.css b/theme/metal/fonts.css index 9dfd6aa04b..d39fd1ef12 100755 --- a/theme/metal/fonts.css +++ b/theme/metal/fonts.css @@ -2,3 +2,10 @@ .logininfo, .helplink, .minicalendar *, .link, .footer { font-size: 9pt !important; } +.heading-with-help { + font-size:1.4em; +} + +.heading-with-help h2 { + font-size:1em; +} diff --git a/theme/orangewhite/styles_layout.css b/theme/orangewhite/styles_layout.css index cf2aecac7d..b8c751ea30 100644 --- a/theme/orangewhite/styles_layout.css +++ b/theme/orangewhite/styles_layout.css @@ -36,10 +36,14 @@ h2.main, h3.main, h4.main, h5.main, -h6.main { +h6.main, +.heading-with-help { margin-left:1em; text-align:left } +.heading-with-help h2 { + margin:0; +} #content { clear:both } diff --git a/theme/standard/styles_fonts.css b/theme/standard/styles_fonts.css index 5cc0b75500..ab7223e1ef 100644 --- a/theme/standard/styles_fonts.css +++ b/theme/standard/styles_fonts.css @@ -123,6 +123,14 @@ h4 { font-weight:bold; } +.heading-with-help { + font-size:1.4em; +} + +.heading-with-help h2.main { + font-size:1em; +} + .helplink { font-size:0.8em; } diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index dfaefa8470..55e3bdc293 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -392,6 +392,16 @@ table.formtable tbody .htmlarea th vertical-align: top; } +.heading-with-help { + text-align:center; + margin:0.83em 0; +} + +.heading-with-help h2 { + margin:0; + display:inline; +} + .helplink img { vertical-align: middle; margin: 0 2px; diff --git a/theme/wood/styles_color.css b/theme/wood/styles_color.css index be46cee761..3b66307ba2 100644 --- a/theme/wood/styles_color.css +++ b/theme/wood/styles_color.css @@ -189,6 +189,7 @@ td.header, div.header, h2.header, h2.main, +.heading-with-help, .sideblock .header, .navbar, table.files th, @@ -206,6 +207,10 @@ legend, background-position:bottom; background-repeat:repeat; } +.heading-with-help h2.main { + border:none; + background:none; +} /** Places using the horizontal medium wood texture without borders **/