MDL-34119_M23 theme_splash: removed redundant js call in lib.php. Added lang option to config.php + amended lang output in layout files. Added some css to style langmenu + removed redundant loginicon in pagelayout.css

This commit is contained in:
Mary Evans
2012-06-30 00:50:34 +01:00
parent a5f6ea2e88
commit 263e8c144c
5 changed files with 36 additions and 30 deletions
+23 -13
View File
@@ -33,10 +33,10 @@ $THEME->sheets = array(
'pagelayout', 'pagelayout',
'core', 'core',
'menus', 'menus',
'red',
'green',
'blue',
'orange', 'orange',
'blue',
'green',
'red',
'settings', 'settings',
); );
@@ -53,48 +53,57 @@ $THEME->layouts = array(
'standard' => array( 'standard' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
// Course page // Course page
'course' => array( 'course' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
// Course page // Course page
'coursecategory' => array( 'coursecategory' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'incourse' => array( 'incourse' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'frontpage' => array( 'frontpage' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'admin' => array( 'admin' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre'), 'regions' => array('side-pre'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'mydashboard' => array( 'mydashboard' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'mypublic' => array( 'mypublic' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array('side-pre', 'side-post'), 'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
'login' => array( 'login' => array(
'file' => 'general.php', 'file' => 'general.php',
'regions' => array() 'regions' => array(),
'options' => array('langmenu'=>true),
), ),
// Pages that appear in pop-up windows - no navigation, no blocks, no header. // Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array( 'popup' => array(
@@ -137,7 +146,8 @@ $THEME->layouts = array(
'report' => array( 'report' => array(
'file' => 'report.php', 'file' => 'report.php',
'regions' => array('side-pre'), 'regions' => array('side-pre'),
'defaultregion' => 'side-pre' 'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
), ),
); );
+6 -2
View File
@@ -32,7 +32,6 @@ $custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
splash_check_colourswitch(); splash_check_colourswitch();
splash_initialise_colourswitcher($PAGE);
$bodyclasses = array(); $bodyclasses = array();
$bodyclasses[] = 'splash-'.splash_get_colour(); $bodyclasses[] = 'splash-'.splash_get_colour();
@@ -107,7 +106,12 @@ echo $OUTPUT->doctype() ?>
alt="orange" /></a></li> alt="orange" /></a></li>
</ul> </ul>
</div> </div>
<?php echo $OUTPUT->lang_menu();?> <?php
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div> </div>
<div id="logobox"> <div id="logobox">
<?php <?php
+6 -2
View File
@@ -32,7 +32,6 @@ $custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
splash_check_colourswitch(); splash_check_colourswitch();
splash_initialise_colourswitcher($PAGE);
$bodyclasses = array(); $bodyclasses = array();
$bodyclasses[] = 'splash-'.splash_get_colour(); $bodyclasses[] = 'splash-'.splash_get_colour();
@@ -107,7 +106,12 @@ echo $OUTPUT->doctype() ?>
alt="orange" /></a></li> alt="orange" /></a></li>
</ul> </ul>
</div> </div>
<?php echo $OUTPUT->lang_menu();?> <?php
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div> </div>
<div id="logobox"> <div id="logobox">
<?php <?php
-11
View File
@@ -87,17 +87,6 @@ function splash_set_customcss($css, $customcss) {
return $css; return $css;
} }
/**
* Adds the JavaScript for the colour switcher to the page.
*
* @param moodle_page $page
*/
function splash_initialise_colourswitcher(moodle_page $page) {
user_preference_allow_ajax_update('theme_splash_chosen_colour', PARAM_ALPHA);
$page->requires->yui_module('moodle-theme_splash-colourswitcher',
'M.theme_splash.initColourSwitcher', array(array('div'=>'#colourswitcher')));
}
/** /**
* Gets the colour the user has selected, or the default if they have never changed * Gets the colour the user has selected, or the default if they have never changed
* *
+1 -2
View File
@@ -199,7 +199,6 @@ p.prolog a:link {
margin:10px 0 0 15px; margin:10px 0 0 15px;
} }
.logininfo{ .logininfo{
background:url([[pix:theme|loginicon]]) left no-repeat;
color:#fff; color:#fff;
margin:0; margin:0;
padding:10px 10px 10px 40px; padding:10px 10px 10px 40px;
@@ -213,7 +212,7 @@ p.prolog a:link {
} }
#headermenu .langmenu{ #headermenu .langmenu{
position:relative; position:relative;
top:35px; top:30px;
width:210px; width:210px;
} }
a, a,