make tag hiding a little more consistent

This commit is contained in:
Shish 2012-08-15 20:22:25 +01:00
parent ec16baecfe
commit 8c39c29528
3 changed files with 7 additions and 10 deletions

View File

@ -1,5 +1,5 @@
$(function() { $(function() {
var blocked_tags = ($.cookie("ui-blocked-tags") || $.cookie("blocked-tags") || "").split(" "); var blocked_tags = ($.cookie("ui-blocked-tags") || "").split(" ");
var themecheck = $(".thumb[data-tags]").parent().attr('class'); var themecheck = $(".thumb[data-tags]").parent().attr('class');
var needs_refresh = false; var needs_refresh = false;
for(i=0; i<blocked_tags.length; i++) { for(i=0; i<blocked_tags.length; i++) {
@ -18,13 +18,8 @@ $(function() {
// text-align: justify with element margins and doesn't recalculate // text-align: justify with element margins and doesn't recalculate
// these margins when part of the line disappears... // these margins when part of the line disappears...
if(needs_refresh) { if(needs_refresh) {
if(themecheck == "thumbblock") { $('.shm-image-list').hide();
$('.blockbody').hide(); $('.shm-image-list').show();
$('.blockbody').show();
}else{
$('#image-list').hide();
$('#image-list').show();
}
} }
}); });

View File

@ -90,10 +90,11 @@ and of course start organising your images :-)
} }
protected function build_table($images, $query) { protected function build_table($images, $query) {
$table = ""; $table = "<div class='shm-image-list'>";
foreach($images as $image) { foreach($images as $image) {
$table .= $this->build_thumb_html($image, $query); $table .= $this->build_thumb_html($image, $query);
} }
$table .= "</div>";
return $table; return $table;
} }
} }

View File

@ -49,10 +49,11 @@ class CustomIndexTheme extends IndexTheme {
} }
protected function build_table($images, $query) { protected function build_table($images, $query) {
$table = ""; $table = "<div class='shm-image-list'>";
foreach($images as $image) { foreach($images as $image) {
$table .= "\t<span class=\"thumb\">" . $this->build_thumb_html($image, $query) . "</span>\n"; $table .= "\t<span class=\"thumb\">" . $this->build_thumb_html($image, $query) . "</span>\n";
} }
$table .= "</div>";
return $table; return $table;
} }
} }