summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-28 11:22:53 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-28 11:22:53 +0000
commit181e434ac94f5159b00582b97e33356a27a56b1b (patch)
tree1febd4070d6baf2878a1b0ef2d243d8b103c211a
parent5add940935c084a10b742bc808644906ea7b7b06 (diff)
Added links to d1 and the edit notes field shouldnt be hidden when adding a VN
git-svn-id: svn://vndb.org/vndb@40 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
-rw-r--r--data/tpl/vnbrowse2
-rw-r--r--data/tpl/vnedit5
-rw-r--r--lib/VNDB/VN.pm2
-rw-r--r--lib/global.pl14
-rw-r--r--static/files/dyna.js4
-rw-r--r--static/files/style.css9
6 files changed, 24 insertions, 12 deletions
diff --git a/data/tpl/vnbrowse b/data/tpl/vnbrowse
index fd071c49..42514bcd 100644
--- a/data/tpl/vnbrowse
+++ b/data/tpl/vnbrowse
@@ -12,7 +12,7 @@
</form>
<div id="adsearch" [[= !$p{searchquery} ? '' : ' style="display: none"' ]]>
- <b>Categories</b> (boolean and, selecting more gives less results)
+ <b>Categories</b> (boolean and, selecting more gives less results. The categories are explained on <a href="/d1">this page</a>)
<ul id="cat">
[[ for my $c (qw| e g t p h l s |) { ]]-
-[[= $c !~ /[thl]/ ? '<li>' : '<br />' ]][[: $VNDB::CAT->{$c}[0] ]]-
diff --git a/data/tpl/vnedit b/data/tpl/vnedit
index f7122149..66d0e40f 100644
--- a/data/tpl/vnedit
+++ b/data/tpl/vnedit
@@ -59,9 +59,10 @@
{ type => 'sub', title => 'Categories', short => 'cat' },
{ type => 'hidden', short => 'categories' },
{ type => 'static', raw => 1, text => eval {
- my $r = '<ul id="cat">';
+ my $r = 'Please read the <a href="/d1">category descriptions</a> before adding or modifying categories!<br /><br />'
+ .'<ul id="cat">';
for my $c (qw| e g t p h l s |) {
- $r .= ($c !~ /[thl]/ ? '<li>' : '<br />').$VNDB::CAT->{$c}[0].'<ul>';
+ $r .= ($c !~ /[thl]/ ? '<li>' : '<br />').$VNDB::CAT->{$c}[0].'<a href="/d1#'.$VNDB::CAT->{$c}[2].'" class="help">?</a><ul>';
for (sort keys %{$VNDB::CAT->{$c}[1]}) {
$r .= sprintf '<li><a href="#" id="cat_%1$s"><b id="b_%1$s">-</b> %2$s</a></li>',
$c.$_, $VNDB::CAT->{$c}[1]{$_};
diff --git a/lib/VNDB/VN.pm b/lib/VNDB/VN.pm
index 52f67f4c..f0727e6a 100644
--- a/lib/VNDB/VN.pm
+++ b/lib/VNDB/VN.pm
@@ -173,7 +173,7 @@ sub VNEdit {
}
$self->AddHid($frm);
- $frm->{_hid} = {map{$_=>1} qw| info cat img |}
+ $frm->{_hid} = {map{$_=>1} qw| info cat img com |}
if !$frm->{_hid} && !$id;
$self->ResAddTpl(vnedit => {
form => $frm,
diff --git a/lib/global.pl b/lib/global.pl
index 787c7647..116f2604 100644
--- a/lib/global.pl
+++ b/lib/global.pl
@@ -99,11 +99,11 @@ our $CAT = {
rp => 'RPG',
st => 'Strategy',
si => 'Simulation',
- } ],
+ }, 2 ],
p => [ 'Plot', { # 0..1
li => 'Linear',
br => 'Branching',
- } ],
+ }, 3 ],
e => [ 'Elements', {
ac => 'Action',
co => 'Comedy',
@@ -116,21 +116,21 @@ our $CAT = {
sf => 'SciFi',
sj => 'Shoujo Ai',
sn => 'Shounen Ai',
- } ],
+ }, 1 ],
t => [ 'Time', { # 0..1
fu => 'Future',
pa => 'Past',
pr => 'Present',
- } ],
+ }, 4 ],
l => [ 'Place', { # 0..1
ea => 'Earth',
fa => "Fant\x{200B}asy world",
sp => 'Space',
- } ],
+ }, 5 ],
h => [ 'Protagonist', { # 0..1
fa => 'Male',
fe => "Fem\x{200B}ale",
- } ],
+ }, 6 ],
s => [ 'Sexual content', {
aa => 'Sexual content',
be => 'Bestiality',
@@ -140,7 +140,7 @@ our $CAT = {
ya => 'Yaoi',
yu => 'Yuri',
ra => 'Rape',
- } ],
+ }, 7 ],
};
diff --git a/static/files/dyna.js b/static/files/dyna.js
index 6a6b169a..1c9c262d 100644
--- a/static/files/dyna.js
+++ b/static/files/dyna.js
@@ -541,10 +541,12 @@ function catLoad() {
var l=x('cat').getElementsByTagName('a');
for(i=0;i<l.length;i++) {
+ if(l[i].id.substr(0, 4) != 'cat_')
+ continue;
catSet(l[i].id.substr(4), cats[l[i].id.substr(4)]||0);
l[i].onclick = function() {
var c = this.id.substr(4);
- if(!cats[c]) cats[c] = 0;
+ if(!cats[c]) cats[c] = 0;
if(c.substr(0,1) == 'p' || c == 'gaa' || c == 'gab' || c.substr(0,1) == 'h' || c.substr(0,1) == 'l' || c.substr(0,1) == 't') {
if(cats[c]++)
cats[c] = 0;
diff --git a/static/files/style.css b/static/files/style.css
index 8b264c73..6a8c4f70 100644
--- a/static/files/style.css
+++ b/static/files/style.css
@@ -361,6 +361,15 @@ span.msg {
span.warning ul, span.msg ul {
padding: 0 0 0 15px;
}
+a.help {
+ vertical-align: super;
+ font-size: 10px;
+ text-decoration: none;
+ font-weight: bold;
+ padding-left: 1px;
+ /*background: #eee;*/
+}
+
/* VN page header, general dl and list markup */
dt {