From abbdb6053907e135e76e5af53a9da438148f7ddb Mon Sep 17 00:00:00 2001 From: Patrick Malley Date: Tue, 22 Jun 2010 15:00:57 +0000 Subject: [PATCH] MDL-22834 - added dock support styles --- theme/leatherbound/config.php | 13 --- theme/leatherbound/layout/frontpage.php | 15 ++- theme/leatherbound/layout/general.php | 4 +- theme/leatherbound/style/core.css | 116 ++++++++++++++++++++++++ 4 files changed, 128 insertions(+), 20 deletions(-) diff --git a/theme/leatherbound/config.php b/theme/leatherbound/config.php index 0a0428d5a77..e6ce14d9835 100644 --- a/theme/leatherbound/config.php +++ b/theme/leatherbound/config.php @@ -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; //////////////////////////////////////////////////// diff --git a/theme/leatherbound/layout/frontpage.php b/theme/leatherbound/layout/frontpage.php index d46c7d327d6..d3880ec9e44 100644 --- a/theme/leatherbound/layout/frontpage.php +++ b/theme/leatherbound/layout/frontpage.php @@ -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() ?> htmlattributes() ?>> @@ -61,7 +66,7 @@ echo $OUTPUT->doctype() ?> -
+
blocks_for_region('side-pre') ?>
@@ -69,7 +74,7 @@ echo $OUTPUT->doctype() ?> -
+
blocks_for_region('side-post') ?>
diff --git a/theme/leatherbound/layout/general.php b/theme/leatherbound/layout/general.php index d95b85133fc..b6a9fc1be1b 100644 --- a/theme/leatherbound/layout/general.php +++ b/theme/leatherbound/layout/general.php @@ -68,7 +68,7 @@ echo $OUTPUT->doctype() ?>
-
+
blocks_for_region('side-pre') ?>
@@ -76,7 +76,7 @@ echo $OUTPUT->doctype() ?> -
+
blocks_for_region('side-post') ?>
diff --git a/theme/leatherbound/style/core.css b/theme/leatherbound/style/core.css index c1187552dc2..81f85588742 100644 --- a/theme/leatherbound/style/core.css +++ b/theme/leatherbound/style/core.css @@ -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%; +} \ No newline at end of file