Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Mary Evans authored June 30, 2012
36  theme/splash/config.php
@@ -33,10 +33,10 @@
33 33
     'pagelayout',
34 34
     'core',
35 35
     'menus',
36  
-    'red',
37  
-    'green',
38  
-    'blue',
39 36
     'orange',
  37
+    'blue',
  38
+    'green',
  39
+    'red',
40 40
     'settings',
41 41
 );
42 42
 
@@ -53,48 +53,57 @@
53 53
     'standard' => array(
54 54
         'file' => 'general.php',
55 55
         'regions' => array('side-pre', 'side-post'),
56  
-        'defaultregion' => 'side-pre'
  56
+        'defaultregion' => 'side-pre',
  57
+        'options' => array('langmenu'=>true),
57 58
     ),
58 59
     // Course page
59 60
     'course' => array(
60 61
         'file' => 'general.php',
61 62
         'regions' => array('side-pre', 'side-post'),
62  
-        'defaultregion' => 'side-pre'
  63
+        'defaultregion' => 'side-pre',
  64
+        'options' => array('langmenu'=>true),
63 65
     ),
64 66
     // Course page
65 67
     'coursecategory' => array(
66 68
         'file' => 'general.php',
67 69
         'regions' => array('side-pre', 'side-post'),
68  
-        'defaultregion' => 'side-pre'
  70
+        'defaultregion' => 'side-pre',
  71
+        'options' => array('langmenu'=>true),
69 72
     ),
70 73
     'incourse' => array(
71 74
         'file' => 'general.php',
72 75
         'regions' => array('side-pre', 'side-post'),
73  
-        'defaultregion' => 'side-pre'
  76
+        'defaultregion' => 'side-pre',
  77
+        'options' => array('langmenu'=>true),
74 78
     ),
75 79
     'frontpage' => array(
76 80
         'file' => 'general.php',
77 81
         'regions' => array('side-pre', 'side-post'),
78  
-        'defaultregion' => 'side-pre'
  82
+        'defaultregion' => 'side-pre',
  83
+        'options' => array('langmenu'=>true),
79 84
     ),
80 85
     'admin' => array(
81 86
         'file' => 'general.php',
82 87
         'regions' => array('side-pre'),
83  
-        'defaultregion' => 'side-pre'
  88
+        'defaultregion' => 'side-pre',
  89
+        'options' => array('langmenu'=>true),
84 90
     ),
85 91
     'mydashboard' => array(
86 92
         'file' => 'general.php',
87 93
         'regions' => array('side-pre', 'side-post'),
88  
-        'defaultregion' => 'side-pre'
  94
+        'defaultregion' => 'side-pre',
  95
+        'options' => array('langmenu'=>true),
89 96
     ),
90 97
     'mypublic' => array(
91 98
         'file' => 'general.php',
92 99
         'regions' => array('side-pre', 'side-post'),
93  
-        'defaultregion' => 'side-pre'
  100
+        'defaultregion' => 'side-pre',
  101
+        'options' => array('langmenu'=>true),
94 102
     ),
95 103
     'login' => array(
96 104
         'file' => 'general.php',
97  
-        'regions' => array()
  105
+        'regions' => array(),
  106
+        'options' => array('langmenu'=>true),
98 107
     ),
99 108
     // Pages that appear in pop-up windows - no navigation, no blocks, no header.
100 109
     'popup' => array(
@@ -137,7 +146,8 @@
137 146
     'report' => array(
138 147
         'file' => 'report.php',
139 148
         'regions' => array('side-pre'),
140  
-        'defaultregion' => 'side-pre'
  149
+        'defaultregion' => 'side-pre',
  150
+        'options' => array('langmenu'=>true),
141 151
     ),
142 152
 );
143 153
 
8  theme/splash/layout/general.php
@@ -32,7 +32,6 @@
32 32
 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
33 33
 
34 34
 splash_check_colourswitch();
35  
-splash_initialise_colourswitcher($PAGE);
36 35
 
37 36
 $bodyclasses = array();
38 37
 $bodyclasses[] = 'splash-'.splash_get_colour();
@@ -107,7 +106,12 @@ class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-
107 106
         alt="orange" /></a></li>
108 107
         </ul>
109 108
         </div>
110  
-        <?php echo $OUTPUT->lang_menu();?>
  109
+        <?php
  110
+        if (!empty($PAGE->layout_options['langmenu'])) {
  111
+            echo $OUTPUT->lang_menu();
  112
+        }
  113
+            echo $PAGE->headingmenu
  114
+        ?>
111 115
         </div>
112 116
         <div id="logobox">
113 117
         <?php
8  theme/splash/layout/report.php
@@ -32,7 +32,6 @@
32 32
 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
33 33
 
34 34
 splash_check_colourswitch();
35  
-splash_initialise_colourswitcher($PAGE);
36 35
 
37 36
 $bodyclasses = array();
38 37
 $bodyclasses[] = 'splash-'.splash_get_colour();
@@ -107,7 +106,12 @@ class="styleswitch colour-orange"><img src="<?php echo $OUTPUT->pix_url('orange-
107 106
         alt="orange" /></a></li>
108 107
         </ul>
109 108
         </div>
110  
-        <?php echo $OUTPUT->lang_menu();?>
  109
+        <?php
  110
+        if (!empty($PAGE->layout_options['langmenu'])) {
  111
+            echo $OUTPUT->lang_menu();
  112
+        }
  113
+        echo $PAGE->headingmenu
  114
+        ?>
111 115
         </div>
112 116
         <div id="logobox">
113 117
         <?php
11  theme/splash/lib.php
@@ -88,17 +88,6 @@ function splash_set_customcss($css, $customcss) {
88 88
 }
89 89
 
90 90
 /**
91  
- * Adds the JavaScript for the colour switcher to the page.
92  
- *
93  
- * @param moodle_page $page
94  
- */
95  
-function splash_initialise_colourswitcher(moodle_page $page) {
96  
-    user_preference_allow_ajax_update('theme_splash_chosen_colour', PARAM_ALPHA);
97  
-    $page->requires->yui_module('moodle-theme_splash-colourswitcher',
98  
-     'M.theme_splash.initColourSwitcher', array(array('div'=>'#colourswitcher')));
99  
-}
100  
-
101  
-/**
102 91
  * Gets the colour the user has selected, or the default if they have never changed
103 92
  *
104 93
  * @param string $default The default colour to use, normally red
3  theme/splash/style/pagelayout.css
@@ -199,7 +199,6 @@ p.prolog a:link {
199 199
     margin:10px 0 0 15px;
200 200
 }
201 201
 .logininfo{
202  
-    background:url([[pix:theme|loginicon]]) left no-repeat;
203 202
     color:#fff;
204 203
     margin:0;
205 204
     padding:10px 10px 10px 40px;
@@ -213,7 +212,7 @@ p.prolog a:link {
213 212
 }
214 213
 #headermenu .langmenu{
215 214
     position:relative;
216  
-    top:35px;
  215
+    top:30px;
217 216
     width:210px;
218 217
 }
219 218
 a,

0 notes on commit 263e8c1

Please sign in to comment.
Something went wrong with that request. Please try again.