summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Tags.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-05 13:03:43 +0200
committerYorhel <git@yorhel.nl>2009-10-05 13:03:43 +0200
commitad638b58f65285285adda787b79b9422ca43313b (patch)
tree653ce4b7f95ce45670596114992a9707eb7f3b8f /lib/VNDB/Handler/Tags.pm
parentd703d1dd64ffcf6af82b2747388a1001228ec30f (diff)
JS: Moved, rewrote and improved VN tag linking
- You can now click the spoiler column to scroll through the options - Or mouse-over the spoiler column to see a JS dropdown with the options (no more select box, which introduces several more clicks to do the same)
Diffstat (limited to 'lib/VNDB/Handler/Tags.pm')
-rw-r--r--lib/VNDB/Handler/Tags.pm33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index 8484ad96..0f8b780a 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -438,43 +438,44 @@ sub vntagmod {
$self->htmlForm({ frm => $frm, action => "/v$vid/tagmod", nosubmit => 1 }, tagmod => [ mt('_tagv_frm_title'),
[ hidden => short => 'taglinks', value => '' ],
[ static => nolabel => 1, content => sub {
- table id => 'tagtable';
+ table class => 'tgl';
thead;
Tr;
td '';
- td colspan => 2, class => 'tc2_1', mt '_tagv_col_you';
- td colspan => 2, class => 'tc3_1', mt '_tagv_col_others';
+ td colspan => 2, class => 'tc_you', mt '_tagv_col_you';
+ td colspan => 2, class => 'tc_others', mt '_tagv_col_others';
end;
Tr;
- my $i=0;
- td class => 'tc'.++$i, mt '_tagv_col_'.$_ for(qw|tag rating spoiler rating spoiler|);
+ td class => 'tc_tagname', mt '_tagv_col_tag';
+ td class => 'tc_myvote', mt '_tagv_col_rating';
+ td class => 'tc_myspoil', mt '_tagv_col_spoiler';
+ td class => 'tc_allvote', mt '_tagv_col_rating';
+ td class => 'tc_allspoil', mt '_tagv_col_spoiler';
end;
end;
tfoot; Tr;
td colspan => 5;
input type => 'submit', class => 'submit', value => mt('_tagv_save'), style => 'float: right';
- input type => 'text', class => 'text', name => 'addtag', value => '';
- input type => 'button', class => 'submit', value => mt '_tagv_add';
+ input id => 'tagmod_tag', type => 'text', class => 'text', value => '';
+ input id => 'tagmod_add', type => 'button', class => 'submit', value => mt '_tagv_add';
br;
p;
lit mt '_tagv_addmsg';
end;
end;
end; end;
- tbody;
+ tbody id => 'tagtable';
for my $t (sort { $a->{name} cmp $b->{name} } @$tags) {
my $m = (grep $_->{tag} == $t->{id}, @$my)[0] || {};
- Tr;
- td class => 'tc1';
- a href => "/g$t->{id}", $t->{name};
- end;
- td class => 'tc2', $m->{vote}||0;
- td class => 'tc3', defined $m->{spoiler} ? $m->{spoiler} : -1;
- td class => 'tc4';
+ Tr id => "tgl_$t->{id}";
+ td class => 'tc_tagname'; a href => "/g$t->{id}", $t->{name}; end;
+ td class => 'tc_myvote', $m->{vote}||0;
+ td class => 'tc_myspoil', defined $m->{spoiler} ? $m->{spoiler} : -1;
+ td class => 'tc_allvote';
tagscore !$m->{vote} ? $t->{rating} : $t->{cnt} == 1 ? 0 : ($t->{rating}*$t->{cnt} - $m->{vote}) / ($t->{cnt}-1);
i ' ('.($t->{cnt} - ($m->{vote} ? 1 : 0)).')';
end;
- td class => 'tc5', sprintf '%.2f', $t->{spoiler};
+ td class => 'tc_allspoil', sprintf '%.2f', $t->{spoiler};
end;
}
end;