Introducing instance ids as id attributes in blocks. This should completely

solve the problem where two instances of the same block did confusing things
when you tried to collapse one of them.

Incidentally, moving some styles for quiz_results block to where they belong.
This commit is contained in:
defacer 2005-02-10 00:50:08 +00:00
parent 7d50b363b5
commit 29ba5158ad
4 changed files with 28 additions and 17 deletions

View file

@ -448,7 +448,7 @@ class block_base {
*/
function html_attributes() {
// Default case: just an id for the block, with our name in it
return array('id' => 'block_'. $this->name());
return array('id' => 'inst'.$this->instance->id, 'class' => 'block_'. $this->name());
}
/**

View file

@ -270,6 +270,26 @@ h4 {
font-size:x-small;
}
.block_quiz_results h1 {
font-weight: bold;
font-size: 1.2em;
}
.block_quiz_results table.grades caption {
font-weight: bold;
}
.block_quiz_results table.grades .number, .block_quiz_results table.grades .grade {
text-align: right;
}
.block_quiz_results {
text-align: center;
}
.block_quiz_results table.grades {
text-align: left;
}
/*****************************
***

View file

@ -447,40 +447,31 @@ td.cal_event_description {
}
/* sideblock weblib.php */
#block_course_summary .sideblockmain {
.block_course_summary .sideblockmain {
padding:10px;
}
/* blocklib.php */
#block_adminblock .sideblockmain {
.block_adminblock .sideblockmain {
text-align: center;
}
/* block_quiz_results.php */
#block_quiz_results {
text-align: center;
}
#block_quiz_results table.grades {
.block_quiz_results table.grades {
width: 100%;
text-align: left;
}
#block_quiz_results table.grades caption {
font-weight: bold;
.block_quiz_results table.grades caption {
margin: 1em 0px 0px 0px;
border-bottom: 1px solid;
}
#block_quiz_results table.grades .number, #block_quiz_results table.grades .grade {
.block_quiz_results table.grades .number, .block_quiz_results table.grades .grade {
width: 10%;
text-align: right;
}
#block_quiz_results h1 {
font-weight: bold;
font-size: 1.2em;
.block_quiz_results h1 {
margin: 4px;
}

View file

@ -83,7 +83,7 @@
-moz-border-radius-bottomright:15px;
}
#block_course_summary, #block_course_summary .sideblockmain {
.block_course_summary, .block_course_summary .sideblockmain {
-moz-border-radius:20px;
}