From 6605ff8cda3e926529271e3b7e804c1cb545930f Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 6 May 2010 06:16:07 +0000 Subject: [PATCH] themes MDL-22358 Renamed sideblock class to block --- .../block_calendar_upcoming.php | 2 +- blocks/dock.js | 2 +- blocks/moodleblock.class.php | 2 +- calendar/event.php | 44 +++++----- calendar/lib.php | 2 +- lib/ajax/block_classes.js | 6 +- lib/deprecatedlib.php | 4 +- lib/javascript-static.js | 4 +- lib/outputcomponents.php | 2 +- mod/lesson/locallib.php | 4 +- mod/quiz/edit.php | 2 +- mod/quiz/styles.css | 4 +- theme/anomaly/javascript/navigation.js | 4 +- ...orners_sideblock.gif => corners_block.gif} | Bin theme/anomaly/style/browser.css | 22 ++--- theme/anomaly/style/general.css | 34 ++++---- theme/base/style/blocks.css | 32 +++---- theme/base/style/core.css | 6 +- theme/base/style/course.css | 2 +- theme/boxxie/style/screen.css | 8 +- theme/canvas/style/core.css | 4 +- theme/formfactor/style/blocks.css | 8 +- theme/standard/javascript/navigation.js | 4 +- theme/standard/style/blocks.css | 36 ++++---- theme/standard/style/css3.css | 8 +- theme/standard/style/dock.css | 8 +- theme/standardold/style/mod_forum.css | 2 +- theme/standardold/style/mod_quiz.css | 4 +- theme/standardold/style/styles_color.css | 14 +-- theme/standardold/style/styles_fonts.css | 32 +++---- theme/standardold/style/styles_layout.css | 82 +++++++++--------- theme/standardold/style/styles_moz.css | 8 +- 32 files changed, 198 insertions(+), 198 deletions(-) rename theme/anomaly/pix/{corners_sideblock.gif => corners_block.gif} (100%) diff --git a/blocks/calendar_upcoming/block_calendar_upcoming.php b/blocks/calendar_upcoming/block_calendar_upcoming.php index ed20ef52cf4..0ad3f97c7a4 100644 --- a/blocks/calendar_upcoming/block_calendar_upcoming.php +++ b/blocks/calendar_upcoming/block_calendar_upcoming.php @@ -64,7 +64,7 @@ class block_calendar_upcoming extends block_base { get_user_preferences('calendar_maxevents', CALENDAR_UPCOMING_MAXEVENTS)); if (!empty($this->instance)) { - $this->content->text = calendar_get_sideblock_upcoming($events, + $this->content->text = calendar_get_block_upcoming($events, 'view.php?view=day&course='.$courseshown.'&'); } diff --git a/blocks/dock.js b/blocks/dock.js index ae6535072a5..61002fcb6f9 100644 --- a/blocks/dock.js +++ b/blocks/dock.js @@ -450,7 +450,7 @@ M.core_dock = { node = node.ancestor('.block-region'); if (node) { var width = node.getStyle('width'); - if (node.all('.sideblock').size() === 0 && this.blockspacewidth === null) { + if (node.all('.block').size() === 0 && this.blockspacewidth === null) { // If the node has no children then we can shrink it this.blockspacewidth = width; node.setStyle('width', '0px'); diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 5bb27f1749b..4c2806f4898 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -534,7 +534,7 @@ class block_base { function html_attributes() { $attributes = array( 'id' => 'inst' . $this->instance->id, - 'class' => 'block_' . $this->name(). ' sideblock' + 'class' => 'block_' . $this->name(). ' block' ); if ($this->instance_can_be_docked() && get_user_preferences('docked_block_instance_'.$this->instance->id, 0)) { $attributes['class'] .= ' dock_on_load'; diff --git a/calendar/event.php b/calendar/event.php index e59819b59d7..45918e044f0 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -221,28 +221,28 @@ list($nextmon, $nextyr) = calendar_add_month((int)$now['mon'], (int)$now['year'] echo ''; -$sideblock = $OUTPUT->box_start('sideblock'); -$sideblock .= $OUTPUT->box($OUTPUT->heading(get_string('eventskey', 'calendar')), 'header'); -$sideblock .= $OUTPUT->box(calendar_filter_controls('event', 'action='.$action.'&id='.$event->id), 'filters content'); -$sideblock .= $OUTPUT->box_end(); -$sideblock .= $OUTPUT->box_start('sideblock'); -$sideblock .= $OUTPUT->box($OUTPUT->heading(get_string('monthlyview', 'calendar')), 'header'); -$sideblock .= $OUTPUT->box_start('content'); -$sideblock .= $OUTPUT->box_start('minicalendarblock minicalendartop'); -$sideblock .= calendar_top_controls('display', array('id' => $courseid, 'm' => $prevmon, 'y' => $prevyr)); -$sideblock .= calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); -$sideblock .= $OUTPUT->box_end(); -$sideblock .= $OUTPUT->box_start('minicalendarblock'); -$sideblock .= calendar_top_controls('display', array('id' => $courseid, 'm' => (int)$now['mon'], 'y' => (int)$now['year'])); -$sideblock .= calendar_get_mini($courses, $groups, $users, (int)$now['mon'], (int)$now['year']); -$sideblock .= $OUTPUT->box_end(); -$sideblock .= $OUTPUT->box_start('minicalendarblock'); -$sideblock .= calendar_top_controls('display', array('id' => $courseid, 'm' => $nextmon, 'y' => $nextyr)); -$sideblock .= calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); -$sideblock .= $OUTPUT->box_end(); -$sideblock .= $OUTPUT->box_end(); -$sideblock .= $OUTPUT->box_end(); -echo $sideblock; +$block = $OUTPUT->box_start('block'); +$block .= $OUTPUT->box($OUTPUT->heading(get_string('eventskey', 'calendar')), 'header'); +$block .= $OUTPUT->box(calendar_filter_controls('event', 'action='.$action.'&id='.$event->id), 'filters content'); +$block .= $OUTPUT->box_end(); +$block .= $OUTPUT->box_start('block'); +$block .= $OUTPUT->box($OUTPUT->heading(get_string('monthlyview', 'calendar')), 'header'); +$block .= $OUTPUT->box_start('content'); +$block .= $OUTPUT->box_start('minicalendarblock minicalendartop'); +$block .= calendar_top_controls('display', array('id' => $courseid, 'm' => $prevmon, 'y' => $prevyr)); +$block .= calendar_get_mini($courses, $groups, $users, $prevmon, $prevyr); +$block .= $OUTPUT->box_end(); +$block .= $OUTPUT->box_start('minicalendarblock'); +$block .= calendar_top_controls('display', array('id' => $courseid, 'm' => (int)$now['mon'], 'y' => (int)$now['year'])); +$block .= calendar_get_mini($courses, $groups, $users, (int)$now['mon'], (int)$now['year']); +$block .= $OUTPUT->box_end(); +$block .= $OUTPUT->box_start('minicalendarblock'); +$block .= calendar_top_controls('display', array('id' => $courseid, 'm' => $nextmon, 'y' => $nextyr)); +$block .= calendar_get_mini($courses, $groups, $users, $nextmon, $nextyr); +$block .= $OUTPUT->box_end(); +$block .= $OUTPUT->box_end(); +$block .= $OUTPUT->box_end(); +echo $block; echo ''; echo ''; diff --git a/calendar/lib.php b/calendar/lib.php index 1c38b896319..643f4f83920 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1007,7 +1007,7 @@ function calendar_days_in_month($month, $year) { return intval(date('t', mktime(0, 0, 0, $month, 1, $year))); } -function calendar_get_sideblock_upcoming($events, $linkhref = NULL) { +function calendar_get_block_upcoming($events, $linkhref = NULL) { $content = ''; $lines = count($events); if (!$lines) { diff --git a/lib/ajax/block_classes.js b/lib/ajax/block_classes.js index bd69cb62255..db9bd7b704a 100644 --- a/lib/ajax/block_classes.js +++ b/lib/ajax/block_classes.js @@ -88,7 +88,7 @@ block_class.prototype.startDrag = function(x, y) { targetEl.opacity = .3; targetEl.filter = "alpha(opacity=30)"; } - } +} block_class.prototype.endDrag = function() { // reset the linked element styles @@ -96,7 +96,7 @@ block_class.prototype.endDrag = function() { s.opacity = 1; s.filter = "alpha(opacity=100)"; this.resetTargets(); - } +} block_class.prototype.onDragDrop = function(e, id) { @@ -232,7 +232,7 @@ block_class.prototype.toggle_hide = function(e, target, isCosmetic) { } } else { this.originalClass = this.getEl().className; - this.getEl().className = "hidden sideblock"; + this.getEl().className = "hidden block"; this.viewbutton.childNodes[0].src = this.viewbutton.childNodes[0].src.replace(/hide.gif/i,'show.gif'); this.viewbutton.childNodes[0].alt = this.viewbutton.childNodes[0].alt.replace(strhide, strshow); this.viewbutton.title = this.viewbutton.title.replace(strhide, strshow); diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index fe63f97c6a5..ab6016fdfdf 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -2233,8 +2233,8 @@ function user_login_string($course='ignored', $user='ignored') { * @param array $icons optional icons for the things in $list. * @param string $footer Extra HTML content that gets output at the end, inside a <div class="footer"> * @param array $attributes an array of attribute => value pairs that are put on the - * outer div of this block. If there is a class attribute ' sideblock' gets appended to it. If there isn't - * already a class, class='sideblock' is used. + * outer div of this block. If there is a class attribute ' block' gets appended to it. If there isn't + * already a class, class='block' is used. * @param string $title Plain text title, as embedded in the $heading. * @deprecated */ diff --git a/lib/javascript-static.js b/lib/javascript-static.js index 8793bb2dd8f..731059647bc 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1048,7 +1048,7 @@ function fix_column_width(colName) { var nodes = column.childNodes; for(i = 0; i < nodes.length; ++i) { - if(nodes[i].className.indexOf("sideblock") != -1 ) { + if(nodes[i].className.indexOf("block") != -1 ) { if(width < nodes[i].offsetWidth) { width = nodes[i].offsetWidth; } @@ -1056,7 +1056,7 @@ function fix_column_width(colName) { } for(i = 0; i < nodes.length; ++i) { - if(nodes[i].className.indexOf("sideblock") != -1 ) { + if(nodes[i].className.indexOf("block") != -1 ) { nodes[i].style.width = width + 'px'; } } diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index cbd87ffedbd..f9d99658cb4 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -1888,7 +1888,7 @@ class block_contents { $this->attributes = $attributes; } else { // simple "fake" blocks used in some modules and "Add new block" block - $this->attributes = array('class'=>'sideblock'); + $this->attributes = array('class'=>'block'); } } diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index 3181a2e9119..652fecaa794 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -489,7 +489,7 @@ function lesson_clock_block_contents($cmid, $lesson, $timer, $page) { $bc = new block_contents(); $bc->title = get_string('timeremaining', 'lesson'); - $bc->attributes['class'] = 'clock sideblock'; + $bc->attributes['class'] = 'clock block'; $bc->content = $content; return $bc; @@ -543,7 +543,7 @@ function lesson_menu_block_contents($cmid, $lesson) { $bc = new block_contents(); $bc->title = get_string('lessonmenu', 'lesson'); - $bc->attributes['class'] = 'menu sideblock'; + $bc->attributes['class'] = 'menu block'; $bc->content = $content; return $bc; diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 53c6c30db37..72a7dd7d467 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -475,7 +475,7 @@ if ($quiz_qbanktool) { $quizcontentsclass = 'quizwhenbankcollapsed'; } -echo '
'; +echo '
'; echo '

'; echo get_string('questionbankcontents', 'quiz') . '