From: urs_hunkler Date: Wed, 9 Jan 2008 15:52:08 +0000 (+0000) Subject: Merged from 1.9 and checked :: MDL-12221 :: I added changes to weblib and the forum... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=52ea8aa0267367860c39f659c118cd53527e92cb;p=moodle.git Merged from 1.9 and checked :: 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. --- diff --git a/lib/weblib.php b/lib/weblib.php index e1b93a08b1..f414c197ef 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3942,13 +3942,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); } /** diff --git a/mod/forum/view.php b/mod/forum/view.php index 751ecc5dcc..8a96fc7aa2 100644 --- a/mod/forum/view.php +++ b/mod/forum/view.php @@ -111,9 +111,10 @@ } - print_box_start('forumcontrol'); +// print_box_start('forumcontrol clearfix'); - print_box_start('subscription'); +// print_box_start('subscription clearfix'); + echo '
'; 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 ''; rss_print_link($course->id, $userid, "forum", $forum->id, $tooltiptext); - print_box_end(); // subscription + echo ''; +// print_box_end(); // subscription } - print_box_end(); // subscription +// print_box_end(); // subscription + echo '
'; - print_box_end(); // forumcontrol +// print_box_end(); // forumcontrol - print_box(' ', 'clearer'); +// print_box(' ', 'clearer'); if (!empty($forum->blockafter) && !empty($forum->blockperiod)) { diff --git a/mod/glossary/view.php b/mod/glossary/view.php index f55ad450b2..af508f2bca 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -282,7 +282,8 @@ } /// Start to print glossary controls - print_box_start('glossarycontrol'); +// print_box_start('glossarycontrol clearfix'); + echo '
'; 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 ''; rss_print_link($course->id, $userid, "glossary", $glossary->id, $tooltiptext); - print_box_end(); + echo ''; +// 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 ''; echo " id&mode=$mode&hook=".urlencode($hook)."&sortkey=$sortkey&sortorder=$sortorder&offset=$offset\">\""."; - print_box_end(); + echo ''; +// print_box_end(); } } /// End glossary controls - print_box_end(); /// glossarycontrol - - print_box(' ', 'clearer'); +// print_box_end(); /// glossarycontrol + echo '
'; + +// print_box(' ', 'clearer'); } /// Info box diff --git a/theme/custom_corners/header.html b/theme/custom_corners/header.html index 4a480463f5..7ba599ef22 100644 --- a/theme/custom_corners/header.html +++ b/theme/custom_corners/header.html @@ -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); + ?> @@ -71,29 +81,27 @@
-
> +
-
-

-
-
+

+
-

-
- +

+
+ /* 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() { diff --git a/theme/custom_corners/pix/mask_borders_le.gif b/theme/custom_corners/pix/mask_borders_le.gif new file mode 100644 index 0000000000..24ecaeb6e4 Binary files /dev/null and b/theme/custom_corners/pix/mask_borders_le.gif differ diff --git a/theme/custom_corners/pix/mask_borders_re.gif b/theme/custom_corners/pix/mask_borders_re.gif new file mode 100644 index 0000000000..b1ceacbd28 Binary files /dev/null and b/theme/custom_corners/pix/mask_borders_re.gif differ diff --git a/theme/custom_corners/pix/mask_box.gif b/theme/custom_corners/pix/mask_box.gif new file mode 100644 index 0000000000..cfbcd6a5d6 Binary files /dev/null and b/theme/custom_corners/pix/mask_box.gif differ diff --git a/theme/custom_corners/pix/small_bg_gradient.png b/theme/custom_corners/pix/small_bg_gradient.png new file mode 100644 index 0000000000..10d49f0d81 Binary files /dev/null and b/theme/custom_corners/pix/small_bg_gradient.png differ diff --git a/theme/custom_corners/rtl.css b/theme/custom_corners/rtl.css index 7e842dc773..ba8cf36e52 100644 --- a/theme/custom_corners/rtl.css +++ b/theme/custom_corners/rtl.css @@ -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); +} \ No newline at end of file diff --git a/theme/custom_corners/styles_ie6.css b/theme/custom_corners/styles_ie6.css index fb899f99c8..a6e079aea0 100644 --- a/theme/custom_corners/styles_ie6.css +++ b/theme/custom_corners/styles_ie6.css @@ -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; } \ No newline at end of file diff --git a/theme/custom_corners/styles_ie7.css b/theme/custom_corners/styles_ie7.css index dc80c1dab8..87ccd85bdc 100644 --- a/theme/custom_corners/styles_ie7.css +++ b/theme/custom_corners/styles_ie7.css @@ -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; } \ No newline at end of file diff --git a/theme/custom_corners/user_styles.css b/theme/custom_corners/user_styles.css index 9942ef7a27..aaacdd643c 100644 --- a/theme/custom_corners/user_styles.css +++ b/theme/custom_corners/user_styles.css @@ -39,6 +39,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%; @@ -59,7 +64,7 @@ p.helplink { } h1.headermain { color: #0066ff; - margin: 10px 0 10px 5px; + margin: 0 0 10px 0; font-size: 180%; } h2.main { @@ -92,18 +97,27 @@ h2.headingblock { 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; @@ -135,6 +149,10 @@ div.errorbox { p.copyright { text-align: center; } +body#admin-index div.adminwarning { + border-style: none; + margin: 20px 30px; +} div.headermenu { margin: 0; padding: 3px; @@ -155,8 +173,9 @@ div.navbar div.navbutton { } 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; @@ -396,6 +415,10 @@ div.sideblock span.icon { } div.sideblock ul.list li { clear: left; + padding-left: 18px; +} +div.sideblock div.column.c0 { + margin-left: -19px; } td.categoryboxcontent { background-color: #EEEEEE; @@ -422,9 +445,26 @@ 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: #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; @@ -435,13 +475,36 @@ fieldset.adminsettings { 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; @@ -501,6 +564,7 @@ div.bt div { div.bt { background-repeat: no-repeat; background-position: 100% 0; + text-align: left; } div.bb div { font-size: 1px; @@ -513,6 +577,7 @@ div.bb div { div.bb { background-repeat: no-repeat; background-position: 100% 0; + text-align: left; } div.i1 { background-repeat: repeat-y; @@ -841,7 +906,7 @@ div#header div.i2 { } 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; @@ -901,7 +966,7 @@ div#header-home div.i2 { } 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; @@ -1020,6 +1085,11 @@ div#content div.ccbox { 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; @@ -1060,6 +1130,11 @@ form#adminsettings span.form-shortname { 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; @@ -1109,6 +1184,12 @@ div.glossarydisplay hr { 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; } @@ -1211,6 +1292,9 @@ body.grade-report-grader table#user-grades td.cat { body.grade-report-grader table#user-grades td.course { font-weight: bold; } +body#admin-roles-override td.cell.c1 { padding-top: 0.5em; } +body#admin-roles-assign td.cell.c3 { padding-top: 0.5em; } +body#admin-roles-assign td.cell.c1 { padding-top: 0.5em; } #admin-roles-override .capcurrent { background-color:#eeeeee; diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 4a76efdf95..620ad7a863 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -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; @@ -3431,12 +3443,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; @@ -3473,6 +3497,10 @@ body#mod-forum-search .introcontent { text-align:center; } +#mod-forum-view .subscription { + margin: 5px 0; +} + /*** *** Modules: Glossary ***/ @@ -3615,6 +3643,7 @@ body#mod-forum-search .introcontent { .mod-glossary .glossarydisplay .tabs { margin-bottom: 0px; } + .mod-glossary .glossarydisplay .tabs .side { border-style: none; border-width: 0px; @@ -3634,6 +3663,7 @@ body#mod-forum-search .introcontent { float: right; text-align:right; white-space: nowrap; + margin: 5px 0; } /***