MDL-12221 :: I added changes to weblib and the forum and glossary view pages, the custom_corners and standard theme to get those pages working.

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.
This commit is contained in:
urs_hunkler
2008-01-09 15:03:29 +00:00
parent 3dd4e13cd6
commit 8f4a3ae2f1
18 changed files with 295 additions and 56 deletions
+8 -1
View File
@@ -3917,13 +3917,20 @@ function print_box($message, $classes='generalbox', $ids='', $return=false) {
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);
}
/**
+11 -7
View File
@@ -111,9 +111,10 @@
}
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";
@@ -173,16 +174,19 @@
} 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('&nbsp;', 'clearer');
// print_box('&nbsp;', 'clearer');
if (!empty($forum->blockafter) && !empty($forum->blockperiod)) {
+14 -8
View File
@@ -282,7 +282,8 @@
}
/// 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
@@ -295,23 +296,28 @@
} 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&amp;mode=$mode&amp;hook=".urlencode($hook)."&amp;sortkey=$sortkey&amp;sortorder=$sortorder&amp;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('&nbsp;', 'clearer');
// print_box_end(); /// glossarycontrol
echo '</div>';
// print_box('&nbsp;', 'clearer');
}
/// Info box
+27 -19
View File
@@ -36,7 +36,11 @@
(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',
@@ -47,17 +51,23 @@
// 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>
@@ -71,29 +81,27 @@
<?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 }
}
+11
View File
@@ -3,6 +3,8 @@
<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";
@@ -25,6 +27,15 @@
} 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() {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

+12
View File
@@ -15,6 +15,12 @@ div.sideblock div.content * {
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;
@@ -216,3 +222,9 @@ body.nocoursepage div#content div.i2 {
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);
}
+65 -4
View File
@@ -2,6 +2,13 @@
* 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;
}
@@ -29,6 +36,28 @@ body {
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
}
@@ -44,6 +73,10 @@ div.block_calendar_month div.calendar-controls a.previous {
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);
}
@@ -89,6 +122,10 @@ td#middle-column div.bt div {
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);
}
@@ -206,9 +243,33 @@ body.nocoursepage div#content div.bb {
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;
}
+27 -7
View File
@@ -1,18 +1,30 @@
/*
* 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
@@ -34,4 +46,12 @@ body.dir-rtl div.block_calendar_month div.calendar-controls a.previous {
}
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;
}
+90 -10
View File
@@ -1,3 +1,4 @@
/* @override http://ubuntu.userver.lan/moodle_19/theme/custom_corners/user_styles.css */
div#infowrapper {
position: fixed;
overflow: auto;
@@ -39,6 +40,11 @@ a:hover {
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%;
@@ -57,7 +63,7 @@ p.helplink {
p.helplink {
margin: 0.5em 0;
}
h1.headermain {
h1.headermain {
color: #0066ff;
margin: 0 0 10px 0;
font-size: 180%;
@@ -90,18 +96,27 @@ h2.headingblock {
border-left-color: #F1ECE6;
}
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 {
@@ -133,6 +148,10 @@ div.errorbox {
border-color: #660000;
}
p.copyright {
text-align: center;
}
body#admin-index div.adminwarning {
border-style: none;
margin: 20px 30px;
}
div.headermenu {
@@ -153,8 +172,9 @@ div.navbar div.navbutton {
div.navbar div.navbutton {
margin-top: 3px;
}
div.navbar {
div.navbar {
padding: 3px 3px 6px 0;
margin: 5px 0 0 0;
clear: both;
background-color: #FFFFFF;
background-image: url(pix/header.png);
@@ -394,6 +414,10 @@ div.sideblock span.icon {
float: left;
margin-right: 0.3em;
}
div.sideblock ul.list li {
clear: left;
padding-left: 18px;
}
div.sideblock div.column.c0 {
margin-left: -19px;
}
@@ -420,10 +444,27 @@ div.sideblock div.header div.commands {
}
div.sideblock div.header div.commands {
height: 16px;
background-color: #ffffff;
}
form#adminsettings fieldset {
margin-top: 1em;
padding: 0;
}
}
fieldset.adminsettings span.form-shortname {
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 {
@@ -433,13 +474,36 @@ fieldset.adminsettings {
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
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;
position: relative;
margin: 0;
}
div#header {
position: relative;
margin: 0;
}
@@ -499,6 +563,7 @@ div.bt div {
background-color: transparent;
}
div.bt {
background-repeat: no-repeat;
background-position: 100% 0;
text-align: left;
}
@@ -511,6 +576,7 @@ div.bb div {
background-color: transparent;
}
div.bb {
background-repeat: no-repeat;
background-position: 100% 0;
text-align: left;
}
@@ -778,7 +844,7 @@ div#header div.i2 {
background-color: transparent;
padding: 0 12px 0 0;
}
div#header div.i3 {
div#header div.i3 {
background-color: #F1ECE6;
padding: 10px 5px 0 5px;
border-top-width: 1px;
@@ -838,7 +904,7 @@ div#header-home div.i2 {
background-color: transparent;
padding: 0 12px 0 0;
}
div#header-home div.i3 {
div#header-home div.i3 {
background-color: #F1ECE6;
padding: 10px 5px;
border-top-width: 1px;
@@ -958,6 +1024,10 @@ div#content div.ccbox {
background-image: url(pix/info_gradient.png);
background-repeat: repeat-x;
background-position: 50% 50%;
padding: 0;
}
body#course-report div#content {
padding: 0;
margin: 10px 0;
}
/*info box section end */
@@ -986,13 +1056,14 @@ form.mform legend {
}
form.mform legend {
color: #0066ff;
font-size: 120%;
}
form#adminsettings span.form-shortname {
color: #AAAAAA;
font-size: 120%;
}
div.coursebox div.summary {
width: 45%;
}
body#mod-forum-view div.subscription {
float: none;
text-align:right;
white-space: nowrap;
}
table.forumpost tr.header {
@@ -1042,6 +1113,12 @@ div.glossarydisplay hr {
background-repeat: repeat-x;
background-position: left top;
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 {
@@ -1137,6 +1214,9 @@ body.grade-report-grader table#user-grades td.cat {
width: auto;
}
body.grade-report-grader table#user-grades tr.avg td.cell {
font-weight: bold;
color: #00008B;
}
body.grade-report-grader table#user-grades td.cat {
font-weight: bold;
}
+30
View File
@@ -154,6 +154,10 @@ div.groupselector {
display:inline;
}
.box {
clear: both;
}
.generalbox {
border-width:1px;
border-style:solid;
@@ -255,6 +259,14 @@ div.groupselector {
.feedback {
}
.rsslink {
padding: 0 0 0 0.3em;
}
.printicon {
padding: 0 0 0 0.3em;
}
.generaltable {
border-width: 1px;
border-style: solid;
@@ -3408,12 +3420,24 @@ body#mod-forum-search .introcontent {
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;
@@ -3450,6 +3474,10 @@ body#mod-forum-search .introcontent {
text-align:center;
}
#mod-forum-view .subscription {
margin: 5px 0;
}
/***
*** Modules: Glossary
***/
@@ -3592,6 +3620,7 @@ body#mod-forum-search .introcontent {
.mod-glossary .glossarydisplay .tabs {
margin-bottom: 0px;
}
.mod-glossary .glossarydisplay .tabs .side {
border-style: none;
border-width: 0px;
@@ -3611,6 +3640,7 @@ body#mod-forum-search .introcontent {
float: right;
text-align:right;
white-space: nowrap;
margin: 5px 0;
}
/***