MDL-22834 - added dock support styles

This commit is contained in:
Patrick Malley 2010-06-22 15:00:57 +00:00
parent e4249c5b32
commit abbdb60539
4 changed files with 128 additions and 20 deletions

View File

@ -33,19 +33,6 @@ $THEME->sheets = array(
// this theme's /styles/ directory.
////////////////////////////////////////////////////
$THEME->parents_exclude_sheets = array(
'base'=>array(
'navigation',
'browser',
),
);
////////////////////////////////////////////////////
// An array of stylesheets not to inherit from the
// themes parents
////////////////////////////////////////////////////
$THEME->enable_dock = true;
////////////////////////////////////////////////////

View File

@ -3,18 +3,23 @@
$hasheading = ($PAGE->heading);
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
$hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$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));
$bodyclasses = array();
if ($hassidepre && !$hassidepost) {
if ($showsidepre && !$showsidepost) {
$bodyclasses[] = 'side-pre-only';
} else if ($hassidepost && !$hassidepre) {
} else if ($showsidepost && !$showsidepre) {
$bodyclasses[] = 'side-post-only';
} else if (!$hassidepost && !$hassidepre) {
} else if (!$showsidepost && !$showsidepre) {
$bodyclasses[] = 'content-only';
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@ -61,7 +66,7 @@ echo $OUTPUT->doctype() ?>
</div>
<?php if ($hassidepre) { ?>
<div id="region-pre">
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
@ -69,7 +74,7 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
<?php if ($hassidepost) { ?>
<div id="region-post">
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>

View File

@ -68,7 +68,7 @@ echo $OUTPUT->doctype() ?>
</div>
<?php if ($hassidepre) { ?>
<div id="region-pre">
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
@ -76,7 +76,7 @@ echo $OUTPUT->doctype() ?>
<?php } ?>
<?php if ($hassidepost) { ?>
<div id="region-post">
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>

View File

@ -168,3 +168,119 @@ h2.headingblock {
.course-content .section.main .content {
background: #fff;
}
/* Dock
---------------------------*/
#dock {
background-color: #f7f5f1;
border-right-color: #433b30;
}
#dock .dockeditem_container {
margin-top: 10px;
}
#dock .dockeditem {
background-color: #fff;
}
#dock .firstdockitem {
margin-top: 1em;
}
#dock .dockeditem .dockedtitle {
border-color: #dddddd;
border-top-color: #fff;
}
#dock .dockeditem .dockedtitle.activeitem {
background: #f7f5f1;
border-top-color:#f7f5f1 ;
}
#dock .firstdockitem .dockedtitle {
border-top-color: #ddd;
}
#dock .dockeditem .dockedtitle h2 {
margin: 12px 0 12px 7px;
}
#dockeditempanel .dockeditempanel_content {
border-color: #433b30;
}
#dockeditempanel .dockeditempanel_hd {
border-bottom: none;
padding: 3px 5px;
background: #f7f6f1;
text-align: left;
}
#dockeditempanel .dockeditempanel_hd h2 {
color: #333;
text-align: left;
font-weight: normal;
font-size: 1.25em;
padding: 0 2px;
}
#dockeditempanel .dockeditempanel_hd .commands {
float: right;
}
/* block expansion code */
.block_js_expansion .block_tree {
overflow-x: scroll;
}
.block_js_expansion.mouseover .content {
width: 200%;
z-index: 1000;
position: relative;
}
.block_js_expansion.mouseover .content .block_tree {
width: 100%;
background-color: #FAFAFA;
padding-bottom: 0px;
}
/** IE stylings */
.ie6 .block .block_tree {
width: 160px;
overflow-x: scroll;
}
.ie6 .block_tree .tree_item {
width: 100%;
}
.ie6 #dock {
position: absolute;
}
.ie6 #dock hr {
display: none;
margin: 0px;
height: 0px;
padding: 0px;
}
.ie6 #dock li p {
background-color: inherit;
}
.ie6 #dock .bd.oversized_content .content, .ie7 #dock .bd.oversized_content .content {
padding-bottom: 0px;
}
.ie6 .block_js_expansion.mouseover .content, .ie7 .block_js_expansion.mouseover .content {
padding-bottom: 2px;
}
.ie6 #dock .bd.oversized_content {
width: 100%;
}