toggle-id -> toggle-sel

This commit is contained in:
Shish 2012-03-12 02:50:41 +00:00
parent 7bdc00ac4e
commit 7d027494b6
7 changed files with 10 additions and 10 deletions

View file

@ -92,7 +92,7 @@ class SetupTheme extends Themelet {
$i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup"; $i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
$html = " $html = "
<div class='setupblock brr'> <div class='setupblock brr'>
<b class='shm-toggler' data-toggle-id='$i'>$h</b> <b class='shm-toggler' data-toggle-sel='#$i'>$h</b>
<br><div id='$i'>$b</div> <br><div id='$i'>$b</div>
</div> </div>
<!-- cancel border --> <!-- cancel border -->

View file

@ -54,11 +54,11 @@ $(document).ready(function() {
var sidebar_hidden = ($.cookie("sidebar-hidden") || "").split("|"); var sidebar_hidden = ($.cookie("sidebar-hidden") || "").split("|");
for(var i in sidebar_hidden) { for(var i in sidebar_hidden) {
$("#"+sidebar_hidden[i]+" .blockbody").hide(); $(sidebar_hidden[i]+" .blockbody").hide();
}; };
$(".shm-toggler").each(function(idx, elm) { $(".shm-toggler").each(function(idx, elm) {
var tid = $(elm).data("toggle-id"); var tid = $(elm).data("toggle-sel");
var tob = $("#"+tid+" .blockbody"); var tob = $(tid+" .blockbody");
$(elm).click(function(e) { $(elm).click(function(e) {
tob.slideToggle("slow"); tob.slideToggle("slow");
if(sidebar_hidden.indexOf(tid) == -1) { if(sidebar_hidden.indexOf(tid) == -1) {

View file

@ -241,7 +241,7 @@ EOD;
$i = str_replace(' ', '_', $h.$s); $i = str_replace(' ', '_', $h.$s);
$html = "<section id='$i'>"; $html = "<section id='$i'>";
if($hidable) { if($hidable) {
if(!is_null($h)) $html .= "\n<h3 class='shm-toggler' data-toggle-id='$i'>$h</h3>\n"; if(!is_null($h)) $html .= "\n<h3 class='shm-toggler' data-toggle-sel='#$i'>$h</h3>\n";
} }
else { else {
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n"; if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";

View file

@ -95,7 +95,7 @@ EOD;
$i = str_replace(' ', '_', $h) . $salt; $i = str_replace(' ', '_', $h) . $salt;
$html = "<section id='$i'>"; $html = "<section id='$i'>";
$h_toggler = $hidable ? " shm-toggler" : ""; $h_toggler = $hidable ? " shm-toggler" : "";
if(!is_null($h)) $html .= "<h3 data-toggle-id='$i' class='$h_toggler'>$h</h3>"; if(!is_null($h)) $html .= "<h3 data-toggle-sel='#$i' class='$h_toggler'>$h</h3>";
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>"; if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>";
$html .= "</section>"; $html .= "</section>";
return $html; return $html;

View file

@ -99,7 +99,7 @@ EOD;
$b = $block->body; $b = $block->body;
$i = str_replace(' ', '_', $h) . $salt; $i = str_replace(' ', '_', $h) . $salt;
$html = "<section id='$i'>"; $html = "<section id='$i'>";
if(!is_null($h)) $html .= "\n<h3 data-toggle-id='$i' class='shm-toggler'>$h</h3>\n"; if(!is_null($h)) $html .= "\n<h3 data-toggle-sel='#$i' class='shm-toggler'>$h</h3>\n";
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>\n"; if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>\n";
$html .= "</section>"; $html .= "</section>";
return $html; return $html;

View file

@ -204,9 +204,9 @@ EOD;
$html = "<section id='$i'>"; $html = "<section id='$i'>";
if(!is_null($h)) { if(!is_null($h)) {
if($salt == "main") { if($salt == "main") {
$html .= "<div class='maintop navside tab shm-toggler' data-toggle-id='$i'>$h</div>"; $html .= "<div class='maintop navside tab shm-toggler' data-toggle-sel='#$i'>$h</div>";
} else { } else {
$html .= "<div class='navtop navside tab shm-toggler' data-toggle-id='$i'>$h</div>"; $html .= "<div class='navtop navside tab shm-toggler' data-toggle-sel='#$i'>$h</div>";
} }
} }
if(!is_null($b)) { if(!is_null($b)) {

View file

@ -108,7 +108,7 @@ EOD;
$b = $block->body; $b = $block->body;
$i = str_replace(' ', '_', $h) . $salt; $i = str_replace(' ', '_', $h) . $salt;
$html = "<section id='$i'>"; $html = "<section id='$i'>";
if(!is_null($h)) $html .= "<h3 data-toggle-id='$i' class='shm-toggler'>$h</h3>"; if(!is_null($h)) $html .= "<h3 data-toggle-sel='#$i' class='shm-toggler'>$h</h3>";
if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>"; if(!is_null($b)) $html .= "<div class='blockbody'>$b</div>";
$html .= "</section>"; $html .= "</section>";
return $html; return $html;