Permalink
Browse files

Merge branch 'wip-MDL-28941-m21' of git://github.com/samhemelryk/mood…

…le into MOODLE_21_STABLE
  • Loading branch information...
2 parents 19cc130 + 9a800e2 commit 9a2bb1ee2c6c3004330f49b9d61cad78b625d7ec @stronk7 stronk7 committed Apr 25, 2012
@@ -2429,8 +2429,10 @@ protected function render_custom_menu(custom_menu $menu) {
// Increment the menu count. This is used for ID's that get worked with
// in JavaScript as is essential
$menucount++;
- // Initialise this custom menu
- $this->page->requires->js_init_call('M.core_custom_menu.init', array('custom_menu_'.$menucount));
+ // Initialise this custom menu (the custom menu object is contained in javascript-static
+ $jscode = js_writer::function_call_with_Y('M.core_custom_menu.init', array('custom_menu_'.$menucount));
+ $jscode = "(function(){{$jscode}})";
+ $this->page->requires->yui_module('node-menunav', $jscode);
// Build the root nodes as required by YUI
$content = html_writer::start_tag('div', array('id'=>'custom_menu_'.$menucount, 'class'=>'yui3-menu yui3-menu-horizontal javascript-disabled'));
$content .= html_writer::start_tag('div', array('class'=>'yui3-menu-content'));
@@ -816,4 +816,3 @@ html, body {
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
}
-
@@ -245,78 +245,57 @@ h2.headingblock {
margin-top:30px;
}
-/*YUI Reset */
-/*full menu bar */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content {
- background: none !important;
-}
-/*single items */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label {
- background: none !important;
-}
-/*active items */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-active, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content, .yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-menuvisible {
- background: #f9f9f9 !important;
- border-color:inherit;
-}
-
-#custommenu .yui3-menu-horizontal,
-#custommenu .yui3-menu-horizontal.javascript-disabled {
- padding-left:100px;
- border-bottom:1px solid #DDD;
- background-color:#EEE;
-}
-
.has-custom-menu #wrapper,
#custommenu .yui3-menu-horizontal .yui3-menu-content,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
#custommenu .yui3-menu-horizontal .yui3-menu-content ul,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover > a {
- border-width:0;
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover > a,
+#custommenu .yui3-menu-horizontal .yui3-menu-label,
+#custommenu .yui3-menuitem,
+#custommenu .yui3-menuitem .yui3-menuitem-content {
+ border-width: 0;
}
-#custommenu .yui3-menu-horizontal .yui3-menu-content ul ul,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul ul {
- background-color:#F9F9F9;
- border:1px solid #DDD;
- border-top-width:0;
+#custommenu {
+ padding-left:100px;
+ border-bottom:1px solid #DDD;
+ background-color:#EEE;
}
-#custommenu .yui3-menu-horizontal .yui3-menu-content li a {
- display:block;
- height:24px;
- vertical-align: bottom;
- padding:5px 10px 0 10px;
- cursor:pointer;
+#custommenu .yui3-menu-content {
+ background-color: transparent;
}
-#custommenu .yui3-menu-horizontal .yui3-menu-content li:hover,
-#custommenu .yui3-menu-horizontal .yui3-menu-content .yui3-menu-label-active {
- background-color:#F9F9F9;
+#custommenu .yui3-menu .yui3-menu-label,
+#custommenu .yui3-menu .yui3-menuitem-content {
+ color:#F25F0F;
+ line-height:24px;
+ padding: 5px 10px;
}
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li:hover > a {
- border-left:1px solid #DDD;
- border-right:1px solid #DDD;
- padding:5px 9px 0 9px;
+#custommenu .custom_menu_submenu .yui3-menu-label,
+#custommenu .custom_menu_submenu .yui3-menuitem-content {
+ padding: 5px 20px;
}
-.yui3-skin-sam #custommenu .yui3-menu-label,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menu-label,
-.yui3-skin-sam #custommenu .yui3-menuitem-content,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menuitem-content {
- color:#F25F0F;
- border-width:0;
- padding-right: 25px;
+#custommenu .custom_menu_submenu .yui3-menu-content,
+#custommenu .yui3-menu-label-active,
+#custommenu .yui3-menu-label-menuvisible {
+ background-color: #f9f9f9;
}
-.yui3-skin-sam #custommenu .yui3-menu-content,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menu-content {
- padding:0;
+#custommenu .custom_menu_submenu .yui3-menu-label-active,
+#custommenu .custom_menu_submenu .yui3-menu-label-menuvisible,
+#custommenu .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content {
+ background-color: #fefefe;
}
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover,
-.yui3-skin-sam #custommenu .yui3-menu .custom_menu_submenu .yui3-menuitem.yui3-menuitem-active .yui3-menuitem-content, #custommenu .yui3-menu-horizontal .custom_menu_submenu .yui3-menu-content .yui3-menu-label-active {
- background-color:#FFF !important;
+#custommenu .custom_menu_submenu .yui3-menu-content {
+ border-left:1px solid #DDD;
+ border-right:1px solid #DDD;
+ border-bottom:1px solid #DDD;
+}
+#custommenu .custom_menu_submenu .custom_menu_submenu .yui3-menu-content {
+ border-top:1px solid #DDD;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -581,6 +581,7 @@ body.tag .managelink {padding: 5px;}
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content .ul {border:1px solid #000;}
#custommenu .yui3-menu-horizontal.javascript-disabled ul {margin:0;padding:0;}
#custommenu .yui3-menu-horizontal.javascript-disabled li {margin:0;padding:0;list-style:none;width:auto;position:relative;}
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu .yui3-menu-label {padding-right:20px;}
#custommenu .yui3-menu-horizontal.javascript-disabled>.yui3-menu-content>ul>li {float:left;}
#custommenu .yui3-menu-horizontal.javascript-disabled li a {padding:0 10px;}
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu {position:absolute;top:-10000px;left:-10000px;visibility:hidden;white-space: nowrap;max-width: 250px;background-color:#FFF;}
@@ -591,6 +592,20 @@ body.tag .managelink {padding: 5px;}
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content .yui3-menu-content {font-size:100%;}
/**
+ * Fix for broken YUI images in the menunav component
+ */
+#custommenu .yui3-menu-label,
+#custommenu .yui3-menuitem-content {cursor:pointer;}
+#custommenu .yui3-menuitem-active {background-color:#B3D4FF;}
+#custommenu .yui3-menuitem-active,
+#custommenu .yui3-menuitem-active .yui3-menuitem-content,
+#custommenu .yui3-menu-horizontal .yui3-menu-label,
+#custommenu .yui3-menu-horizontal .yui3-menu-content {background-image:none;background-position:right center;background-repeat:no-repeat;}
+#custommenu .yui3-menu-label,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-label {background-image:url([[pix:theme|vertical-menu-submenu-indicator]]);}
+#custommenu .yui3-menu .yui3-menu .yui3-menu-label-menuvisible {background-image:url([[pix:theme|horizontal-menu-submenu-indicator]]);}
+
+/**
* Smart Select Element
*/
.smartselect {position:absolute;}
@@ -707,12 +722,6 @@ body.tag .managelink {padding: 5px;}
*/
.ie.dir-rtl .mform .fitem .felement {margin-right:0;text-align:right;float:right;}
-/**
- * Fix for broken YUI images in the menunav component
- */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content {background-image:none;}
-
.mod-indent-1 {margin-left:20px;}
.mod-indent-2 {margin-left:40px;}
.mod-indent-3 {margin-left:60px;}
@@ -880,4 +889,4 @@ sup {vertical-align: super;}
#page-admin-setting-enrolsettingsflatfile.dir-rtl .informationbox {direction: ltr;text-align: left;}
-#page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {margin-right: 170px;}
+#page-admin-grade-edit-scale-edit.dir-rtl .error input#id_name {margin-right: 170px;}
@@ -275,67 +275,49 @@ body.has_dock {
#custommenu .yui3-menu-horizontal .yui3-menu-content ul,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover > a,
-#custommenu .yui3-menu-horizontal .yui3-menu-label, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
- border-width:0;
+#custommenu .yui3-menu-horizontal .yui3-menu-label,
+#custommenu .yui3-menuitem,
+#custommenu .yui3-menuitem .yui3-menuitem-content {
+ border-width: 0;
}
-/*YUI Reset */
-/*full menu bar */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-content {
- background: none !important;
-}
-/*single items */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label {
- background: none !important;
-}
-/*active items */
-.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-active, .yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content, .yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label-menuvisible {
- background: none !important;
- border-color:inherit;
-}
-.yui3-menuitem, .yui3-menuitem .yui3-menuitem-content {
- border: none !important;
-}
+#custommenu .yui3-menu .yui3-menu {background-color:#F9F9F9;border:1px solid #F14E16;}
-#custommenu .yui3-menu-horizontal .yui3-menu-content ul ul,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content ul ul {
- background-color:#F9F9F9;
- border:1px solid #F14E16;
- border-top-width:0;
+#custommenu .yui3-menu .yui3-menu-label,
+#custommenu .yui3-menu .yui3-menuitem-content {
+ color: #FFF;
}
-
-#custommenu .yui3-menu-horizontal .yui3-menu-content .yui3-menu-label, .yui3-menuitem .yui3-menuitem-content, .yui3-menuitem {
- color:#FFF !important;
+#custommenu .yui3-menu .yui3-menu .yui3-menu-label,
+#custommenu .yui3-menu .yui3-menu .yui3-menuitem-content {
+ color: #000;
+}
+#custommenu .yui3-menuitem-active .yui3-menuitem-content {
+ color: #F14E16
}
-.yui3-skin-sam #custommenu .yui3-menu-content,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menu-content {
+#custommenu .yui3-menu-content,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-content {
padding:0;
}
-#custommenu .custom_menu_submenu .yui3-menu-content .yui3-menu-label, .custom_menu_submenu .yui3-menuitem .yui3-menuitem-content {
- color: #000 !important;
+#custommenu .yui3-menu-label-active,
+#custommenu .yui3-menu-label-menuvisible,
+#custommenu .yui3-menu .yui3-menu .yui3-menuitem-active .yui3-menuitem-content {
+ background-color:#F14E16;
+ color:#FFF;
}
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover,
-#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover a,
-.yui3-skin-sam #custommenu .yui3-menu .custom_menu_submenu .yui3-menuitem.yui3-menuitem-active .yui3-menuitem-content {
- background-color:#F14E16 !important;
- color:#FFF !important;
+#custommenu .yui3-menuitem-active .yui3-menuitem-content {
+ background-color: #F9F9F9;
}
-.yui3-skin-sam .yui3-menu-label-active,
-.yui3-skin-sam .yui3-menu-label-menuvisible,
-.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,
-.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible, #custommenu .custom_menu_submenu .yui3-menu-content .yui3-menu-label-active, #custommenu .custom_menu_submenu .yui3-menu-content .yui3-menu-label-menuvisible {
- background-color:#F14E16 !important;
- color:#FFF !important;
-}
-#custommenu .yui3-menu-horizontal .yui3-menu-content li a {
- cursor:pointer;
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover,
+#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover a {
+ background-color:#F14E16;
+ color:#FFF;
}
.pagelayout-redirect #content p,
-.pagelayout-redirect #content div {color:#FFF;}
+.pagelayout-redirect #content div {color:#FFF;}
@@ -1053,9 +1053,12 @@ h2.headingblock {
}
.myclear {
- clear: both;
+ clear: both;
}
+#custommenu {
+ overflow:hidden;
+}
#custommenu .yui3-menu-horizontal .yui3-menu-content,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content,
#custommenu .yui3-menu-horizontal .yui3-menu-content ul,
@@ -1072,24 +1075,23 @@ h2.headingblock {
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover,
#custommenu .yui3-menu-horizontal.javascript-disabled .yui3-menu-content li li:hover a,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menuitem.yui3-menuitem-active .yui3-menuitem-content {
+#custommenu .yui3-menu .yui3-menuitem.yui3-menuitem-active .yui3-menuitem-content {
background-color:#4E6632;
}
-.yui3-skin-sam .yui3-menu-label-active,
-.yui3-skin-sam .yui3-menu-label-menuvisible,
-.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-active,
-.yui3-skin-sam .yui3-menu .yui3-menu .yui3-menu-label-menuvisible {
- background-color:#4E6632;
+#custommenu .yui3-menu-label-active,
+#custommenu .yui3-menu-label-menuvisible,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-label-active,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-label-menuvisible {
+ background-color:#4E6632;
}
-
-#custommenu .yui3-menu-horizontal .yui3-menu-content li a {
- cursor:pointer;
+#custommenu .yui3-menu-content,
+#custommenu .yui3-menu .yui3-menu .yui3-menu-content {
+ padding:0;
}
-.yui3-skin-sam #custommenu .yui3-menu-content,
-.yui3-skin-sam #custommenu .yui3-menu .yui3-menu .yui3-menu-content {
- padding:0;
+#custommenu .yui3-menuitem .yui3-menuitem-content {
+ border-width:0;
}
Oops, something went wrong. Retry.

0 comments on commit 9a2bb1e

Please sign in to comment.