In the view pages I changed the container function call to a simple "echo 'div ...'" to avoid the custom_corners container overhead and page oddity.
In weblib I added "clearfix" handling to the function "print_box_start($classes ...". "clearfix" is handed over to the containing divs. This is a hack, but I didn't know how to handle it without rewriting too much areas.
function print_box_start($classes='generalbox', $ids='', $return=false) {
global $THEME;
+ if (strpos($classes, 'clearfix') !== false) {
+ $clearfix = true;
+ $classes = trim(str_replace('clearfix', '', $classes));
+ } else {
+ $clearfix = false;
+ }
+
if (!empty($THEME->customcorners)) {
$classes .= ' ccbox box';
} else {
$classes .= ' box';
}
- return print_container_start(false, $classes, $ids, $return);
+ return print_container_start($clearfix, $classes, $ids, $return);
}
/**
}
- print_box_start('forumcontrol');
+// print_box_start('forumcontrol clearfix');
- print_box_start('subscription');
+// print_box_start('subscription clearfix');
+ echo '<div class="subscription">';
if (!empty($USER->id) && !has_capability('moodle/legacy:guest', $context, NULL, false)) {
$SESSION->fromdiscussion = "$FULLME";
} else {
$userid = $USER->id;
}
- print_box_start('rsslink');
+// print_box_start('rsslink');
+ echo '<span class="wrap rsslink">';
rss_print_link($course->id, $userid, "forum", $forum->id, $tooltiptext);
- print_box_end(); // subscription
+ echo '</span>';
+// print_box_end(); // subscription
}
- print_box_end(); // subscription
+// print_box_end(); // subscription
+ echo '</div>';
- print_box_end(); // forumcontrol
+// print_box_end(); // forumcontrol
- print_box(' ', 'clearer');
+// print_box(' ', 'clearer');
if (!empty($forum->blockafter) && !empty($forum->blockperiod)) {
}
/// Start to print glossary controls
- print_box_start('glossarycontrol');
+// print_box_start('glossarycontrol clearfix');
+ echo '<div class="glossarycontrol" style="text-align: right">';
echo $availableoptions;
/// If rss are activated at site and glossary level and this glossary has rss defined, show link
} else {
$userid = $USER->id;
}
- print_box_start('rsslink');
+// print_box_start('rsslink');
+ echo '<span class="wrap rsslink">';
rss_print_link($course->id, $userid, "glossary", $glossary->id, $tooltiptext);
- print_box_end();
+ echo '</span>';
+// print_box_end();
}
/// The print icon
if ( $showcommonelements and $mode != 'search') {
if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
- print_box_start('printicon');
+// print_box_start('printicon');
+ echo '<span class="wrap printicon">';
echo " <a title =\"". get_string("printerfriendly","glossary") ."\" href=\"print.php?id=$cm->id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\"><img class=\"icon\" src=\"print.gif\" alt=\"". get_string("printerfriendly","glossary") . "\" /></a>";
- print_box_end();
+ echo '</span>';
+// print_box_end();
}
}
/// End glossary controls
- print_box_end(); /// glossarycontrol
-
- print_box(' ', 'clearer');
+// print_box_end(); /// glossarycontrol
+ echo '</div>';
+
+// print_box(' ', 'clearer');
}
/// Info box
(strpos($bodytags, ' nocoursepage'))) {
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
-
+
+ // get class list
+ preg_match('/class="([^"]*)"/i', $bodytags, $classes);
+ $classlist = explode (' ', $classes[1]);
+
// add 'nocoursepage' to the list of CLASSes on several pages
if (strpos($bodytags, 'nocoursepage') === false) {
$includelist = array('admin-roles-assign', 'admin-roles-override',
// include user roles for the Moodle user settings called
// from the start page
if (($COURSE->id > 1) || ($_GET['contextid'] == 30) || ($_GET['contextid'] == 61)) {
- preg_match('/class="([^"]*)"/i', $bodytags, $classes);
- $classlist = explode (' ', $classes[1]);
if (!in_array('nocoursepage', $classlist)) {
array_push($classlist, 'nocoursepage');
- $bodytags = str_replace($classes[0],
- 'class="'.implode(' ', $classlist).'"', $bodytags);
}
}
}
}
+ // add "inpopup" or "notinpopup" to class list
+ if ($inpopup) {
+ array_push($classlist, 'inpopup');
+ } else {
+ array_push($classlist, 'notinpopup');
+ }
+
+ //replace classlist with new one
+ $bodytags = str_replace($classes[0], 'class="'.implode(' ', $classlist).'"', $bodytags);
+
?>
</head>
<?php if(!empty($infooutput)) { ?>
<div id="infowrapper"><div id="infooverlay"><?php echo $infooutput; ?></div></div>
<?php } ?>
-<div id="page"<?php echo (' class="'.(($inpopup) ? 'inpopup' : 'notinpopup').'"'); ?>>
+<div id="page">
<?php if (!$inpopup) {
if ($home) { // This is what gets printed on the home page only
?>
<?php print_container_start(true, '', 'header-home'); ?>
- <div class="wraphome clearfix">
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- </div>
+ <h1 class="headermain"><?php echo $heading ?></h1>
+ <div class="headermenu"><?php echo $menu ?></div>
<?php print_container_end(); ?>
<?php } else if ($heading) { // This is what gets printed on any other page with a heading
?>
<?php print_container_start(true, '', 'header'); ?>
- <h1 class="headermain"><?php echo $heading ?></h1>
- <div class="headermenu"><?php echo $menu ?></div>
- <div class="navbar clearfix">
- <?php if ($navigation) { // This is the navigation table with breadcrumbs
- ?>
- <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- <?php } ?>
- </div>
+ <h1 class="headermain"><?php echo $heading ?></h1>
+ <div class="headermenu"><?php echo $menu ?></div>
+ <div class="navbar clearfix">
+ <?php if ($navigation) { // This is the navigation table with breadcrumbs
+ ?>
+ <div class="breadcrumb"><?php print_navigation($navigation); ?></div>
+ <div class="navbutton"><?php echo $button; ?></div>
+ <?php } ?>
+ </div>
<?php print_container_end(); ?>
<?php }
}
<script type="text/javascript" charset="utf-8">
/* <![CDATA[ */
var script = {
+ themepath: '<?php echo $CFG->themewww .'/'. current_theme() ?>',
+
corrections: function () {
if (top.user) {
top.document.getElementsByTagName('frameset')[0].rows = "117,30%,0,200";
} else {
$('body').addClass('nolayouttable');
}
+
+ // set a smaller right and left padding on the admin pages
+ // with a htmlarea
+ var htmlarea = $('#adminsettings .form-htmlarea');
+ var docwidth = $(document).width();
+
+ if (htmlarea.length && (docwidth <= 1024)) {
+ $('#page').css('margin', '0 1%');
+ }
},
info: function() {
div.calendar-controls a.next {
text-align: left;
}
+div.bt {
+ text-align: right;
+}
+div.bb {
+ text-align: right;
+}
div.sideblock div.header div.bt div {
background-position: 100% 0;
right: -13px;
body.nocoursepage div#content div.i3 {
/*background: transparent;*/
}
+div#content div.ccbox div.i1 {
+ background-image: url(pix/mask_borders_re.gif);
+}
+div#content div.ccbox div.i2 {
+ background-image: url(pix/mask_borders_le.gif);
+}
\ No newline at end of file
* These styles are ONLY included for IE 6 (via meta.php)
*/
+.sep.arrow {
+ padding-left: 0.5em;
+}
+.tabrow0 div,
+.tabrow0 ul {
+ top: 4.2em;
+}
div.navbar {
height: 2em;
}
background-image: none;
background-color: #F1ECE6;
}
+th.header {
+ background-image: url(pix/header.gif);
+}
+table.forumpost tr.header {
+ background-image: url(pix/header.gif);
+}
+.loginbox h2 {
+ font-size: 1.5em;
+}
+div.sideblock ul.list li {
+ clear: left;
+ padding-left: 18px;
+ margin-left: 19px;
+}
+#notes-index #content-i3,
+#mod-chat-view #content-i3 {
+ padding-bottom: 15px;
+}
+#notes-index #content-i3 .ccbox,
+#mod-chat-view #content-i3 .ccbox {
+ margin-bottom: 0;
+}
/*div.block_calendar_month div.calendar-controls span.hide {
display: none
}
div.block_calendar_month div.calendar-controls a.next {
float: right;
}*/
+#header div.bt,
+#header div.bb {
+ position: relative;
+}
div.sideblock div.bt div {
background-image: url(pix/box.gif);
}
body.dir-rtl td#middle-column div.bt div {
right: -12px;
}
+body.dir-rtl #header div.bt,
+body.dir-rtl #header div.bb {
+ left: 0;
+}
td#middle-column div.bt {
background-image: url(pix/box.gif);
}
body.nocoursepage.dir-rtl div#content div.bb {
right: -12px;
}
-th.header {
- background-image: url(pix/header.gif);
+div#content div.ccbox div.bt div {
+ background-image: url(pix/mask_box.gif);
}
-table.forumpost tr.header {
- background-image: url(pix/header.gif);
+div#content div.ccbox div.bt {
+ background-image: url(pix/mask_box.gif);
+}
+div#content div.ccbox div.i1 {
+ background-image: url(pix/mask_borders_le.gif);
+}
+div#content div.ccbox div.i2 {
+ background-image: url(pix/mask_borders_re.gif);
+}
+div#content div.ccbox div.bb div {
+ background-image: url(pix/mask_box.gif);
+}
+div#content div.ccbox div.bb {
+ background-image: url(pix/mask_box.gif);
+}
+div#content div.ccbox div.i3 {
+ border-color: #f9f6f3;
+}
+body.dir-rtl div#content div.ccbox div.i1 {
+ background-image: url(pix/mask_borders_re.gif);
+}
+body.dir-rtl div#content div.ccbox div.i2 {
+ background-image: url(pix/mask_borders_le.gif);
+}
+div#content div.ccbox {
+ border-style: none;
}
\ No newline at end of file
+
/*
* These styles are ONLY included for IE 7 (via meta.php)
*/
-div.navbar {
- height: 2em;
+.sep.arrow {
+ padding-left: 0.5em;
}
-div.sideblock ul.list li {
- margin: 0.4em 0;
+.tabrow0 div,
+.tabrow0 ul {
+ top: 2.9em;
+}
+div.navbar {
+ height: 2em;
}
div.i1 {
- min-width: 0;
+ min-width: 0;
}
-div#header div.i3 {
- min-width: 0;
+div#header div.i3,
+div#header-home div.i3 {
+ min-width: 0;
+}
+div.sideblock ul.list li {
+ margin: 0.4em 0;
+}
+.loginbox h2 {
+ font-size: 1.5em;
}
div.block_calendar_month div.calendar-controls span.hide {
display: none
}
body.dir-rtl div.block_calendar_month div.calendar-controls a.next {
float: left;
+}
+#notes-index #content-i3,
+#mod-chat-view #content-i3 {
+ padding-bottom: 15px;
+}
+#notes-index #content-i3 .ccbox,
+#mod-chat-view #content-i3 .ccbox {
+ margin-bottom: 0;
}
\ No newline at end of file
color: #0066FF;
text-decoration: underline;
}
+hr {
+ color: #F1ECE6;
+ background-color: #F1ECE6;
+ border-style: none;
+}
span.arrow {
font-family:Arial,Helvetica,Courier,sans-serif;
font-size: 80%;
}
h1.headermain {
color: #0066ff;
- margin: 10px 0 10px 5px;
+ margin: 0 0 10px 0;
font-size: 180%;
}
h2.main {
div.loginbox {
border: 1px solid #F1ECE6;
}
+.loginbox.twocolumns .loginpanel {
+ border-right: 1px solid #F1ECE6;
+}
div.noticebox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
+div#notice.generalbox {
+ border-style: none;
+}
div.generalbox {
border: 1px solid #F1ECE6;
}
div.generalbox.ccbox {
border-style: none;
}
+div.ccbox {
+ border-style: none;
+}
table.generalbox {
border-top-width: 1px;
border-style: solid none none;
p.copyright {
text-align: center;
}
+body#admin-index div.adminwarning {
+ border-style: none;
+ margin: 20px 30px;
+}
div.headermenu {
margin: 0;
padding: 3px;
}
div.navbar {
padding: 3px 3px 6px 0;
- margin-top: 5px;
+ margin: 5px 0 0 0;
clear: both;
+ background-color: #FFFFFF;
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: center bottom;
}
div.sideblock ul.list li {
clear: left;
+ padding-left: 18px;
+}
+div.sideblock div.column.c0 {
+ margin-left: -19px;
}
td.categoryboxcontent {
background-color: #EEEEEE;
height: 16px;
background-color: #ffffff;
}
+form#adminsettings fieldset {
+ margin-top: 1em;
+ padding: 0;
+}
fieldset.adminsettings span.form-shortname {
- color: #cccccc;
+ color: #AAAAAA;
+ font-style: italic;
+ font-size: 90%;
+}
+form#adminsettings span.form-shortname {
+ color: #AAAAAA;
+ font-style: italic;
+ font-size: 90%;
+}
+form#adminsettings span.defaultinfo {
+ color: #AAAAAA;
+ font-style: italic;
font-size: 90%;
+ margin-left: 1.5em;
+ padding-bottom: 0.2em;
}
fieldset.adminsettings {
background-color: #EEEEEE;
form.mform div.textarea textarea {
width: 35em;
}
+form#adminsettings div.form-item {
+ /*background: url(pix/small_bg_gradient.png) repeat-x 0 bottom;*/
+ border-top: 1px solid #F1ECE6;
+}
+form#adminsettings .form-label {
+ padding-right: 0.3em;
+ border-right: 1px solid #F1ECE6};
+}
+form#adminsettings div.form-htmlarea {
+ width: 600px;
+}
+body#admin-lang div.generalbox {
+ border-style: none;
+}
+body#admin-lang table.translator {
+ border-color: #F1ECE6;
+}
+body#admin-langimport div.generalbox {
+ border-style: none;
+}
+div.htmlarea iframe{
+ width: 600px !important;
+}
div#header-home {
position: relative;
margin: 0;
- padding: 5px 5px 0 0;
}
div#header {
position: relative;
+ margin: 0;
}
td#left-column {
padding-top: 10px;
div.bt {
background-repeat: no-repeat;
background-position: 100% 0;
+ text-align: left;
}
div.bb div {
font-size: 1px;
div.bb {
background-repeat: no-repeat;
background-position: 100% 0;
+ text-align: left;
}
div.i1 {
background-repeat: repeat-y;
}
div#header div.i3 {
background-color: #F1ECE6;
- padding: 0 10px;
+ padding: 10px 5px 0 5px;
border-top-width: 1px;
border-bottom-width: 1px;
border-style: solid none;
}
div#header-home div.i3 {
background-color: #F1ECE6;
- padding: 0;
+ padding: 10px 5px;
border-top-width: 1px;
border-bottom-width: 1px;
border-style: solid none;
background-position: 50% 50%;
padding: 0;
}
+body#course-report div#content {
+ padding: 0;
+ margin: 10px 0;
+}
+/*info box section end */
td#middle-column tr.section {
background-image: url(pix/bottom_shadow_to_top.png);
background-repeat: repeat-x;
div.coursebox div.summary {
width: 45%;
}
+body#mod-forum-view div.subscription {
+ float: none;
+ text-align:right;
+ white-space: nowrap;
+}
table.forumpost tr.header {
background-image: url(pix/header.png);
background-repeat: repeat-x;
height: 10px;
border-style: none;
}
+body#mod-glossary-view div.glossarycontrol {
+ float: none;
+ text-align: right;
+ white-space: nowrap;
+ margin: 5px 0;
+}
div.mwiki div.tabtree {
margin-top: 10px;
}
body.grade-report-grader table#user-grades td.course {
font-weight: bold;
}
+body#admin-roles-override td.cell.c1 {\r padding-top: 0.5em;\r}
+body#admin-roles-assign td.cell.c3 {\r padding-top: 0.5em;\r}
+body#admin-roles-assign td.cell.c1 {\r padding-top: 0.5em;\r}
#admin-roles-override .capcurrent {
background-color:#eeeeee;
display:inline;
}
+.box {
+ clear: both;
+}
+
.generalbox {
border-width:1px;
border-style:solid;
.feedback {
}
+.rsslink {
+ padding: 0 0 0 0.3em;
+}
+
+.printicon {
+ padding: 0 0 0 0.3em;
+}
+
.generaltable {
border-width: 1px;
border-style: solid;
white-space: nowrap;
}
+#mod-forum-view .groupmenu {
+ float: left;
+ text-align:left;
+ white-space: nowrap;
+}
+
#mod-forum-view .forumcontrol .subscription {
float: right;
text-align:right;
white-space: nowrap;
}
+#mod-forum-view .subscription {
+ float: right;
+ text-align:right;
+ white-space: nowrap;
+}
+
#mod-forum-index .subscription {
float: right;
text-align:right;
text-align:center;
}
+#mod-forum-view .subscription {
+ margin: 5px 0;
+}
+
/***
*** Modules: Glossary
***/
.mod-glossary .glossarydisplay .tabs {
margin-bottom: 0px;
}
+
.mod-glossary .glossarydisplay .tabs .side {
border-style: none;
border-width: 0px;
float: right;
text-align:right;
white-space: nowrap;
+ margin: 5px 0;
}
/***