Skip to content

Commit

Permalink
MDL-22834 - added dock support styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Malley committed Jun 22, 2010
1 parent e4249c5 commit abbdb60
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 20 deletions.
13 changes: 0 additions & 13 deletions theme/leatherbound/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,6 @@
// 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;

////////////////////////////////////////////////////
Expand Down
15 changes: 10 additions & 5 deletions theme/leatherbound/layout/frontpage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -61,15 +66,15 @@
</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>
</div>
<?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>
Expand Down
4 changes: 2 additions & 2 deletions theme/leatherbound/layout/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@
</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>
</div>
<?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>
Expand Down
116 changes: 116 additions & 0 deletions theme/leatherbound/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
}

0 comments on commit abbdb60

Please sign in to comment.