only hidablise relevant things, and make the whole block clickable

This commit is contained in:
Shish 2009-07-16 21:05:00 +01:00
parent 6ff1e542b9
commit bde744826e

View File

@ -76,14 +76,7 @@ EOD;
$b = $block->body; $b = $block->body;
$html = ""; $html = "";
$i = str_replace(' ', '_', $h) . $salt; $i = str_replace(' ', '_', $h) . $salt;
if($hidable) { if($hidable) $html .= "
#$toggle = " onclick=\"toggle('$i')\"";
$toggle = "";
}
else {
$toggle = "";
}
if(!is_null($h)) $html .= "
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$(\"#$i-toggle\").click(function() { $(\"#$i-toggle\").click(function() {
@ -101,9 +94,11 @@ EOD;
} }
}); });
</script> </script>
<div class='hrr'> ";
if(!is_null($h)) $html .= "
<div class='hrr' id='$i-toggle'>
<div class='hrrtop'><div></div></div> <div class='hrrtop'><div></div></div>
<div class='hrrcontent'><h3 id='$i-toggle'$toggle>$h</h3></div> <div class='hrrcontent'><h3>$h</h3></div>
<div class='hrrbot'><div></div></div> <div class='hrrbot'><div></div></div>
</div> </div>
"; ";