Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-34119_M23 theme_splash: removed redundant js call in lib.php. Add…

…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...
commit 263e8c144cd6ce05abfddbf131b9fa0fbbdcace7 1 parent a5f6ea2
@lazydaisy lazydaisy authored
View
36 theme/splash/config.php
@@ -33,10 +33,10 @@
'pagelayout',
'core',
'menus',
- 'red',
- 'green',
- 'blue',
'orange',
+ 'blue',
+ 'green',
+ 'red',
'settings',
);
@@ -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(
@@ -137,7 +146,8 @@
'report' => array(
'file' => 'report.php',
'regions' => array('side-pre'),
- 'defaultregion' => 'side-pre'
+ 'defaultregion' => 'side-pre',
+ 'options' => array('langmenu'=>true),
),
);
View
8 theme/splash/layout/general.php
@@ -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();
@@ -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
View
8 theme/splash/layout/report.php
@@ -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();
@@ -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
View
11 theme/splash/lib.php
@@ -88,17 +88,6 @@ function splash_set_customcss($css, $customcss) {
}
/**
- * 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
*
* @param string $default The default colour to use, normally red
View
3  theme/splash/style/pagelayout.css
@@ -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;
@@ -213,7 +212,7 @@ p.prolog a:link {
}
#headermenu .langmenu{
position:relative;
- top:35px;
+ top:30px;
width:210px;
}
a,
Please sign in to comment.
Something went wrong with that request. Please try again.