toggle-id -> toggle-sel
This commit is contained in:
parent
7bdc00ac4e
commit
7d027494b6
7 changed files with 10 additions and 10 deletions
|
@ -92,7 +92,7 @@ class SetupTheme extends Themelet {
|
|||
$i = preg_replace('/[^a-zA-Z0-9]/', '_', $h) . "-setup";
|
||||
$html = "
|
||||
<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>
|
||||
</div>
|
||||
<!-- cancel border -->
|
||||
|
|
|
@ -54,11 +54,11 @@ $(document).ready(function() {
|
|||
|
||||
var sidebar_hidden = ($.cookie("sidebar-hidden") || "").split("|");
|
||||
for(var i in sidebar_hidden) {
|
||||
$("#"+sidebar_hidden[i]+" .blockbody").hide();
|
||||
$(sidebar_hidden[i]+" .blockbody").hide();
|
||||
};
|
||||
$(".shm-toggler").each(function(idx, elm) {
|
||||
var tid = $(elm).data("toggle-id");
|
||||
var tob = $("#"+tid+" .blockbody");
|
||||
var tid = $(elm).data("toggle-sel");
|
||||
var tob = $(tid+" .blockbody");
|
||||
$(elm).click(function(e) {
|
||||
tob.slideToggle("slow");
|
||||
if(sidebar_hidden.indexOf(tid) == -1) {
|
||||
|
|
|
@ -241,7 +241,7 @@ EOD;
|
|||
$i = str_replace(' ', '_', $h.$s);
|
||||
$html = "<section id='$i'>";
|
||||
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 {
|
||||
if(!is_null($h)) $html .= "\n<h3>$h</h3>\n";
|
||||
|
|
|
@ -95,7 +95,7 @@ EOD;
|
|||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
$html = "<section id='$i'>";
|
||||
$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>";
|
||||
$html .= "</section>";
|
||||
return $html;
|
||||
|
|
|
@ -99,7 +99,7 @@ EOD;
|
|||
$b = $block->body;
|
||||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
$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";
|
||||
$html .= "</section>";
|
||||
return $html;
|
||||
|
|
|
@ -204,9 +204,9 @@ EOD;
|
|||
$html = "<section id='$i'>";
|
||||
if(!is_null($h)) {
|
||||
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 {
|
||||
$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)) {
|
||||
|
|
|
@ -108,7 +108,7 @@ EOD;
|
|||
$b = $block->body;
|
||||
$i = str_replace(' ', '_', $h) . $salt;
|
||||
$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>";
|
||||
$html .= "</section>";
|
||||
return $html;
|
||||
|
|
Reference in a new issue