Navigation Menu

Skip to content

Commit

Permalink
MDL-34119_M23 theme_splash: removed redundant js call in lib.php. Add…
Browse files Browse the repository at this point in the history
…ed lang option to config.php + amended lang output in layout files. Added some css to style langmenu + removed redundant loginicon in pagelayout.css
  • Loading branch information
Mary Evans committed Jun 30, 2012
1 parent 6be7840 commit 44ca33e
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 30 deletions.
36 changes: 23 additions & 13 deletions theme/splash/config.php
Expand Up @@ -33,10 +33,10 @@
'pagelayout',
'core',
'menus',
'red',
'green',
'blue',
'orange',
'blue',
'green',
'red',
'settings',
);

Expand All @@ -53,48 +53,57 @@
'standard' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
// Course page
'course' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
// Course page
'coursecategory' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'incourse' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'frontpage' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'admin' => array(
'file' => 'general.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'mydashboard' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'mypublic' => array(
'file' => 'general.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
'login' => array(
'file' => 'general.php',
'regions' => array()
'regions' => array(),
'options' => array('langmenu'=>true),
),
// Pages that appear in pop-up windows - no navigation, no blocks, no header.
'popup' => array(
Expand Down Expand Up @@ -137,7 +146,8 @@
'report' => array(
'file' => 'report.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre'
'defaultregion' => 'side-pre',
'options' => array('langmenu'=>true),
),
);

Expand Down
8 changes: 6 additions & 2 deletions theme/splash/layout/general.php
Expand Up @@ -32,7 +32,6 @@
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));

splash_check_colourswitch();
splash_initialise_colourswitcher($PAGE);

$bodyclasses = array();
$bodyclasses[] = 'splash-'.splash_get_colour();
Expand Down Expand Up @@ -107,7 +106,12 @@ class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-
alt="orange" /></a></li>
</ul>
</div>
<?php echo $OUTPUT->lang_menu();?>
<?php
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div>
<div id="logobox">
<?php
Expand Down
8 changes: 6 additions & 2 deletions theme/splash/layout/report.php
Expand Up @@ -32,7 +32,6 @@
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));

splash_check_colourswitch();
splash_initialise_colourswitcher($PAGE);

$bodyclasses = array();
$bodyclasses[] = 'splash-'.splash_get_colour();
Expand Down Expand Up @@ -107,7 +106,12 @@ class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-
alt="orange" /></a></li>
</ul>
</div>
<?php echo $OUTPUT->lang_menu();?>
<?php
if (!empty($PAGE->layout_options['langmenu'])) {
echo $OUTPUT->lang_menu();
}
echo $PAGE->headingmenu
?>
</div>
<div id="logobox">
<?php
Expand Down
11 changes: 0 additions & 11 deletions theme/splash/lib.php
Expand Up @@ -87,17 +87,6 @@ function splash_set_customcss($css, $customcss) {
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
*
Expand Down
3 changes: 1 addition & 2 deletions theme/splash/style/pagelayout.css
Expand Up @@ -199,7 +199,6 @@ p.prolog a:link {
margin:10px 0 0 15px;
}
.logininfo{
background:url([[pix:theme|loginicon]]) left no-repeat;
color:#fff;
margin:0;
padding:10px 10px 10px 40px;
Expand All @@ -213,7 +212,7 @@ p.prolog a:link {
}
#headermenu .langmenu{
position:relative;
top:35px;
top:30px;
width:210px;
}
a,
Expand Down

0 comments on commit 44ca33e

Please sign in to comment.