Here be DIVs.
This commit is contained in:
@@ -197,13 +197,6 @@ class block_base {
|
||||
* Display the block!
|
||||
*/
|
||||
function _print_block() {
|
||||
// Wrap the title in a floating DIV, in case we have edit controls to display
|
||||
// These controls will always be wrapped on a right-floating DIV
|
||||
$title = '<div class="title">'.$this->title.'</div>';
|
||||
if ($this->edit_controls !== NULL) {
|
||||
$title .= $this->edit_controls;
|
||||
}
|
||||
|
||||
// is_empty() includes a call to get_content()
|
||||
if ($this->is_empty()) {
|
||||
if (empty($this->edit_controls)) {
|
||||
@@ -219,7 +212,7 @@ class block_base {
|
||||
print_side_block(NULL, $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes());
|
||||
} else {
|
||||
// The full treatment, please
|
||||
print_side_block($title, $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes());
|
||||
print_side_block($this->_title_html(), $this->content->text, NULL, NULL, $this->content->footer, $this->html_attributes());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,11 +223,28 @@ class block_base {
|
||||
* block is in place, even if empty.
|
||||
*/
|
||||
function _print_shadow() {
|
||||
$title = '<div class="title">'.$this->title.'</div>';
|
||||
print_side_block($this->_title_html(), ' ', NULL, NULL, '', array('class' => 'hidden'));
|
||||
}
|
||||
|
||||
|
||||
function _title_html() {
|
||||
global $CFG;
|
||||
|
||||
$title = '<div class="title">';
|
||||
|
||||
if (!empty($CFG->allowuserblockhiding)) {
|
||||
$title .= '<div class="hide-show"><a href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, \'DIV\', \'sideblock\'); } ); return false;"><img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="hide-show-image" /></a></div>';
|
||||
}
|
||||
|
||||
$title .= $this->title;
|
||||
|
||||
if ($this->edit_controls !== NULL) {
|
||||
$title .= $this->edit_controls;
|
||||
}
|
||||
print_side_block($title, ' ', NULL, NULL, '', array('class' => 'hidden'));
|
||||
|
||||
$title .= '</div>';
|
||||
|
||||
return $title;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -552,13 +562,6 @@ class block_list extends block_base {
|
||||
}
|
||||
|
||||
function _print_block() {
|
||||
// Wrap the title in a floating DIV, in case we have edit controls to display
|
||||
// These controls will always be wrapped on a right-floating DIV
|
||||
$title = '<div class="title">'.$this->title.'</div>';
|
||||
if ($this->edit_controls !== NULL) {
|
||||
$title .= $this->edit_controls;
|
||||
}
|
||||
|
||||
// is_empty() includes a call to get_content()
|
||||
if ($this->is_empty()) {
|
||||
if (empty($this->edit_controls)) {
|
||||
@@ -574,7 +577,7 @@ class block_list extends block_base {
|
||||
print_side_block(NULL, '', $this->content->items, $this->content->icons, $this->content->footer, $this->html_attributes());
|
||||
} else {
|
||||
// The full treatment, please
|
||||
print_side_block($title, '', $this->content->items, $this->content->icons, $this->content->footer, $this->html_attributes());
|
||||
print_side_block($this->_title_html(), '', $this->content->items, $this->content->icons, $this->content->footer, $this->html_attributes());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-7
@@ -738,7 +738,7 @@ function popup_form($common, $options, $formname, $selected='', $nothing='choose
|
||||
' method="get"'.
|
||||
' target="'.$CFG->framename.'"'.
|
||||
' name="'.$formname.'"'.
|
||||
' class="popupform" style="display: inline;">';
|
||||
' class="popupform">';
|
||||
|
||||
$output = '<select name="jump" onchange="'.$targetwindow.'.location=document.'.$formname.
|
||||
'.jump.options[document.'.$formname.'.jump.selectedIndex].value;">'."\n";
|
||||
@@ -3986,12 +3986,7 @@ function print_side_block_start($heading='', $attributes = array()) {
|
||||
|
||||
echo '<div '.$attrtext.'>';
|
||||
if ($heading) {
|
||||
echo '<div class="header">'.$heading;
|
||||
if (!empty($CFG->allowuserblockhiding)) {
|
||||
echo '<div class="hide-show"><a href="#" onclick="elementToggleHide(this, true, function(el) {return findParentNode(el, \'TABLE\', \'sideblock\'); } ); return false;"><img src="'.$CFG->pixpath.'/spacer.gif" alt="" class="hide-show-image" /></a></div>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<div class="subhead"> </div>';
|
||||
echo '<div class="header">'.$heading.'</div>';
|
||||
}
|
||||
echo '<div class="content">';
|
||||
|
||||
|
||||
@@ -223,14 +223,12 @@ body#admin-index .c0 {
|
||||
*** Blocks
|
||||
***/
|
||||
|
||||
.sideblock {
|
||||
border-color:#DDDDDD;
|
||||
}
|
||||
|
||||
.sideblock .header {
|
||||
border-color: #dddddd;
|
||||
}
|
||||
|
||||
.sideblock .content {
|
||||
border-color: #dddddd;
|
||||
background-color:#FCFCFC;
|
||||
}
|
||||
|
||||
@@ -240,6 +238,7 @@ body#admin-index .c0 {
|
||||
|
||||
.sideblock .list {
|
||||
}
|
||||
|
||||
.sideblock .header .hide-show img.hide-show-image {
|
||||
background: url('../../pix/t/switch_minus.gif') no-repeat bottom;
|
||||
}
|
||||
|
||||
@@ -307,22 +307,16 @@ body#admin-config .confighelp {
|
||||
}
|
||||
|
||||
.sideblock {
|
||||
width: 100%;
|
||||
margin-bottom:1em;
|
||||
border-collapse:separate;
|
||||
border-width:1px;
|
||||
border-style:solid;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sideblock .header {
|
||||
text-align: left;
|
||||
padding:4px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sideblock .subhead {
|
||||
clear: both;
|
||||
height: 0px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sideblock .header .hide-show {
|
||||
@@ -336,12 +330,11 @@ body#admin-config .confighelp {
|
||||
}
|
||||
|
||||
.sideblock .header .commands {
|
||||
float: right;
|
||||
margin-top: 0.3em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.sideblock .header .title {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.sideblock .header .commands a {
|
||||
@@ -349,7 +342,9 @@ body#admin-config .confighelp {
|
||||
}
|
||||
|
||||
.sideblock .content {
|
||||
padding:4px;
|
||||
padding: 4px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.sideblock .content hr {
|
||||
@@ -375,7 +370,7 @@ body#admin-config .confighelp {
|
||||
}
|
||||
|
||||
.sideblock .footer {
|
||||
margin-top:4px;
|
||||
margin-bottom: 4px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
@@ -384,12 +379,6 @@ body#admin-config .confighelp {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.sideblock .head {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***
|
||||
*** Calendar
|
||||
|
||||
@@ -116,26 +116,16 @@
|
||||
/***
|
||||
*** Blocks
|
||||
***/
|
||||
.sideblock {
|
||||
-moz-border-radius-bottomleft:20px;
|
||||
-moz-border-radius-bottomright:20px;
|
||||
}
|
||||
|
||||
.sideblock.hidden {
|
||||
-moz-border-radius: 0px;
|
||||
}
|
||||
|
||||
.sideblock {
|
||||
-moz-border-radius-bottomleft:20px;
|
||||
-moz-border-radius-bottomright:20px;
|
||||
}
|
||||
|
||||
.sideblock .content {
|
||||
-moz-border-radius-bottomleft:20px;
|
||||
-moz-border-radius-bottomright:20px;
|
||||
}
|
||||
|
||||
|
||||
.block_course_summary, .block_course_summary .content {
|
||||
-moz-border-radius:20px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user