Permalink
Browse files

Merged changes and fixed whitespace issues for MDL-23188

  • Loading branch information...
2 parents 0742ea8 + e391f90 commit e3cc5b1a7f7d51669314bb4400b30aa9fe6d7f29 Sam Hemelryk committed May 2, 2011
@@ -7,7 +7,8 @@
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
$showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT);
-
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
@@ -17,6 +18,9 @@
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
+}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -42,6 +46,11 @@
}
echo $PAGE->headingmenu
?></div><?php } ?>
+
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
+
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
@@ -5,12 +5,16 @@
$hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT);
-
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if (!$showsidepre) {
$bodyclasses[] = 'content-only';
}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
+}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
@@ -36,6 +40,11 @@
}
echo $PAGE->headingmenu
?></div><?php } ?>
+
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
+
<?php if ($hasnavbar) { ?>
<div class="navbar clearfix">
<div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
@@ -121,8 +121,6 @@ html, body {background-color:#C8C9C7;}
.group .r1 .cell,
.admin table .r1 .cell {background-color:#EEE;}
-.admin .plugincompattable .r1 .cell {background-color:#FFF;}
-
.singlebutton,
.buttons {text-align:center;margin:20px;}
.buttons form {display:inline;}
@@ -222,4 +220,32 @@ html, body {background-color:#C8C9C7;}
/** Overide for RTL layout **/
.dir-rtl #page-header .navbar .breadcrumb {float:right;}
-.dir-rtl #page-header .navbar .navbutton {float:left;}
+.dir-rtl #page-header .navbar .navbutton {float:left;}
+
+/** Custom menu **/
+/*YUI Reset */
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {background-position: -10000px -10000px;}
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em { background-position: right center; }
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {background-position: 3px center;}
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {background-position: 0% 50%;}
+#custommenu {clear: both;padding-left: 4px;margin-bottom: 0px;padding-bottom: 2px;}
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menuitem-content {color: #fff;font-weight: 800;line-height: 30px;}
+.yui3-skin-sam #page .custom_menu_submenu .yui3-menu-label,
+.yui3-skin-sam #page .custom_menu_submenu .yui3-menuitem-content {color: #000 !important;text-shadow: none !important;line-height: 25px;}
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
+.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {color: #000;background-color: #697F55;}
+.yui3-skin-sam #page .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {border: none !important;}
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {border-color:#808080;border-style:solid;border-width:0px 0;}
+
+#page .custom_menu_submenu {border: 1px solid #697F55 !important;-webkit-border-bottom-right-radius: 5px;-webkit-border-bottom-left-radius: 5px;-moz-border-radius-bottomright: 5px;-moz-border-radius-bottomleft: 5px;border-bottom-right-radius: 5px;border-bottom-left-radius: 5px;}
@@ -5,6 +5,8 @@
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
@@ -15,7 +17,10 @@
$bodyclasses[] = 'content-only';
}
if ($hassidepre || $hassidepost) {
- $bodyclasses[] = 'background';
+ $bodyclasses[] = 'background';
+}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
}
echo $OUTPUT->doctype() ?>
@@ -30,23 +35,25 @@
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
- <div id="wrapper" class="clearfix">
+ <div id="wrapper" class="clearfix">
<!-- START OF HEADER -->
<div id="page-header" class="clearfix">
- <div id="page-header-wrapper">
- <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
- <div class="headermenu">
- <?php
- echo $OUTPUT->login_info();
- echo $OUTPUT->lang_menu();
- echo $PAGE->headingmenu;
- ?>
- </div>
- </div>
+ <div id="page-header-wrapper">
+ <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+ <div class="headermenu">
+ <?php
+ echo $OUTPUT->login_info();
+ echo $OUTPUT->lang_menu();
+ echo $PAGE->headingmenu;
+ ?>
+ </div>
+ </div>
</div>
-
+<?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+<?php } ?>
<!-- END OF HEADER -->
<!-- START OF CONTENT -->
@@ -87,7 +94,7 @@
<!-- END OF CONTENT -->
- </div>
+ </div>
<!-- START OF FOOTER -->
@@ -8,6 +8,8 @@
$showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
$showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
+$custommenu = $OUTPUT->custom_menu();
+$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($showsidepre && !$showsidepost) {
@@ -17,7 +19,9 @@
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
-
+if ($hascustommenu) {
+ $bodyclasses[] = 'has_custom_menu';
+}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -29,29 +33,33 @@
<?php echo $OUTPUT->standard_top_of_body_html() ?>
<div id="page">
- <div id="wrapper" class="clearfix">
+ <div id="wrapper" class="clearfix">
<?php if ($hasheading || $hasnavbar) { ?>
<div id="page-header" class="clearfix">
- <?php if ($hasheading) { ?>
- <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
- <div class="headermenu">
- <?php
- echo $OUTPUT->login_info();
- if (!empty($PAGE->layout_options['langmenu'])) {
- echo $OUTPUT->lang_menu();
- }
- echo $PAGE->headingmenu
- ?>
- </div>
- <?php } ?>
+ <?php if ($hasheading) { ?>
+ <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
+ <div class="headermenu">
+ <?php
+ echo $OUTPUT->login_info();
+ if (!empty($PAGE->layout_options['langmenu'])) {
+ echo $OUTPUT->lang_menu();
+ }
+ echo $PAGE->headingmenu
+ ?>
+ </div>
+ <?php } ?>
</div>
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
+
<?php if ($hasnavbar) { ?>
- <div class="navbar clearfix">
- <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
+ <div class="navbar clearfix">
+ <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
<div class="navbutton"> <?php echo $PAGE->button; ?></div>
</div>
<?php } ?>
@@ -48,11 +48,19 @@ a:hover {
margin-bottom: 5px;
}
+.has_custom_menu #page-header {
+ margin-bottom: 0px;
+}
+
.headermain {
font-weight: normal;
margin: 1em 0.5em 0.75em;
}
+#page-content {
+ float: none;
+}
+
/* Footer
-------------------------*/
#page-footer {
@@ -230,4 +238,70 @@ body.has_dock {
#dockeditempanel .dockeditempanel_hd h2 {
font-size: 1em;
color: #fff;
+}
+
+/*cutom menu */
+/*YUI Reset */
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-active,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-active .yui3-menuitem-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label-menuvisible {background-position: -10000px -10000px;}
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menubuttonnav .yui3-menu-label em {background-position: right center;}
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label .yui3-menu-toggle {background-position: 3px center;}
+.yui3-skin-sam #page .yui3-splitbuttonnav .yui3-menu-label-menuvisible .yui3-menu-toggle {background-position: 0% 50%;}
+
+#custommenu {
+ clear: both;
+ background-image: url([[pix:theme|headingblock]]);
+ margin-bottom: 5px;
+}
+
+.yui3-skin-sam #page .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menuitem-content {
+ color: #fff;
+ font-weight: 800;
+ line-height: 30px;
+}
+
+.custom_menu_submenu .yui3-menu-label,
+.custom_menu_submenu .yui3-menuitem-content {
+ color: #000 !important;
+ text-shadow: none !important;
+ line-height: 25px;
+}
+
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-active,
+.yui3-skin-sam #page .yui3-menu-label.yui3-menu-label-menuvisible,
+.yui3-skin-sam #page .yui3-menuitem-active .yui3-menuitem-content {
+ color: #000;
+ background-color: #d8d2c6;
+}
+
+.yui3-skin-sam #page .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu .yui3-menu .yui3-menu-content,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam #page .yui3-menu-horizontal .yui3-menuitem-content {
+ border: none !important;
+}
+
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menu-label,
+.yui3-skin-sam .yui3-menu-horizontal .yui3-menuitem-content {
+ border-color:#808080;
+ border-style:solid;
+ border-width:0px 0;
+}
+
+#page .custom_menu_submenu {
+ border: 2px solid #d8d2c6 !important;
+ background: #fff;
+ -webkit-border-radius: 2px;
+ -moz-border-radius: 2px;
+ border-radius: 2px;
+ -webkit-box-shadow: 0px 1px 3px #ccc;
+ -moz-box-shadow: 0px 1px 3px #ccc;
+ box-shadow: 0px 1px 3px #ccc;
}

0 comments on commit e3cc5b1

Please sign in to comment.