summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-30 10:02:06 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-30 10:02:06 +0000
commit5fd0fb77b025faf71946df483296f24e756e3657 (patch)
treedf77cc322ab8bbb2b4864d5359fee8470b0db6d3
parent0c5cd15570ea2b741b86c6cff8dbc5d9365a4cc6 (diff)
Fixed a few typos, the edit summary is optional again, and added warnings for extreme votes and empty edit summaries
git-svn-id: svn://vndb.org/vndb@47 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
-rw-r--r--data/tpl/pedit2
-rw-r--r--data/tpl/redit2
-rw-r--r--data/tpl/vnpage2
-rw-r--r--lib/ChangeLog3
-rw-r--r--lib/VNDB/Producers.pm2
-rw-r--r--lib/VNDB/Releases.pm2
-rw-r--r--lib/VNDB/VN.pm2
-rw-r--r--static/files/def.js28
8 files changed, 31 insertions, 12 deletions
diff --git a/data/tpl/pedit b/data/tpl/pedit
index 6ef398cf..363f9619 100644
--- a/data/tpl/pedit
+++ b/data/tpl/pedit
@@ -37,7 +37,7 @@
{ type => 'sub', title => 'Edit summary', short => 'com' },
{ type => 'textarea', name => 'Edit summary', short => 'comm', rows => 3, cols => 60 },
- { type => 'static', text => 'Please motivate your modifications and cite all sources.' },
+ { type => 'static', text => 'Please explain your modifications and cite all sources.' },
{ type => 'submit', text => $d{id} ? 'Edit' : 'Add' },
{ type => 'endform' },
diff --git a/data/tpl/redit b/data/tpl/redit
index 163bf5b6..73744517 100644
--- a/data/tpl/redit
+++ b/data/tpl/redit
@@ -62,7 +62,7 @@
{ type => 'sub', title => 'Edit summary', short => 'com' },
{ type => 'textarea', name => 'Edit summary', short => 'comm', rows => 3, cols => 60 },
- { type => 'static', text => 'Please motivate your modifications and cite all sources.' },
+ { type => 'static', text => 'Please explain your modifications and cite all sources.' },
{ type => 'submit', text => $d{id} ? 'Edit' : 'Add' },
{ type => 'endform' },
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
index e848089d..6a2835ec 100644
--- a/data/tpl/vnpage
+++ b/data/tpl/vnpage
@@ -174,7 +174,7 @@ if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]]
[[ if($d{vote}{vid}) { ]]-
<li><a href="/v[[= $d{vn}{id} ]]/vote?v=-1">revoke</a></li>
[[ } for (reverse 1..10) { ]]-
- <li class="center"><a href="/v[[= $d{vn}{id} ]]/vote?v=[[= $_ ]]">[[= $_ ]]</a></li>
+ <li class="center"><a href="/v[[= $d{vn}{id} ]]/vote?v=[[= $_ ]]" id="dovote_[[= $_ ]]">[[= $_ ]]</a></li>
[[ } ]]
</ul>
</div>
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 99448d1c..d8815122 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -10,8 +10,9 @@ TODO:
- Releases, producers and visual novel items can't be fully deleted anymore
- Hidden vote and vnlist items from the 'recent' lists on VN stat pages for
users who don't want that to be seen
- - Edit summary field is required
+ - Added warnings for empty edit summary and extreme votes
- Changed earliest release date to 1980
+ - Added NES and MSX platforms
1.17 - 2008-06-21 (r33)
- Added PS3 and Xbox 360 to platforms
diff --git a/lib/VNDB/Producers.pm b/lib/VNDB/Producers.pm
index b47ce8a6..ba800c7c 100644
--- a/lib/VNDB/Producers.pm
+++ b/lib/VNDB/Producers.pm
@@ -95,7 +95,7 @@ sub PEdit {
{ name => 'lang', required => 1, enum => [ keys %$VNDB::LANG ] },
{ name => 'website', required => 0, maxlength => 200, template => 'url', default => '' },
{ name => 'desc', required => 0, maxlength => 10240, default => '' },
- { name => 'comm', required => 1, minlength => 10, maxlength => 1000 },
+ { name => 'comm', required => 0, default => '' },
);
return $self->ResRedirect('/p'.$id, 'post')
diff --git a/lib/VNDB/Releases.pm b/lib/VNDB/Releases.pm
index f40a9128..bf293647 100644
--- a/lib/VNDB/Releases.pm
+++ b/lib/VNDB/Releases.pm
@@ -83,7 +83,7 @@ sub REdit {
{ name => 'media', required => 0, default => '' },
{ name => 'producers', required => 0, default => '' },
{ name => 'vn', required => 1, maxlength => 10240 },
- { name => 'comm', required => 1, minlength => 10, maxlength => 1000 },
+ { name => 'comm', required => 0, default => '' },
);
my $released = !$frm->{released}[0] ? 0 :
diff --git a/lib/VNDB/VN.pm b/lib/VNDB/VN.pm
index 7e1b41c6..f0727e6a 100644
--- a/lib/VNDB/VN.pm
+++ b/lib/VNDB/VN.pm
@@ -94,7 +94,7 @@ sub VNEdit {
{ name => 'img_nsfw', required => 0 },
{ name => 'categories', required => 0, default => '' },
{ name => 'relations', required => 0, default => '' },
- { name => 'comm', required => 1, minlength => 10, maxlength => 1000 },
+ { name => 'comm', required => 0, default => '' },
);
$frm->{img_nsfw} = $frm->{img_nsfw} ? 1 : 0;
$frm->{anime} = join(' ', sort { $a <=> $b } grep /^[0-9]+$/, split(/\s+/, $frm->{anime})); # re-sort
diff --git a/static/files/def.js b/static/files/def.js
index 39772b9a..a6f80ae4 100644
--- a/static/files/def.js
+++ b/static/files/def.js
@@ -228,7 +228,7 @@ DOMLoad(function() {
// vnlist
cl('askcomment', function() {
- this.href = this.href + '&amp;c=' + encodeURIComponent(prompt("Enter personal note (optional)", '')||'');
+ this.href = this.href + ';c=' + encodeURIComponent(prompt("Enter personal note (optional)", '')||'');
return true;
});
@@ -253,9 +253,16 @@ DOMLoad(function() {
}
}
- // confirm popup
- cl('idel', function () {
- return confirm('Are you sure you want to delete this item?\n\nAll previous edits will be deleted, this action can not be reverted!') });
+ // vote warnings
+ cl('dovote_10', function() { return confirm(
+ "You are about to give this visual novel a 10 out of 10. This is a rather extreme rating, "
+ +"meaning this is one of the best visual novels you've ever played and it's unlikely "
+ +"that any other game could ever be better than this one.\n"
+ +"It is generally a bad idea to have more than three games in your vote list with this rating, choose carefully!") });
+ cl('dovote_1', function() { return confirm(
+ "You are about to give this visual novel a 1 out of 10. This is a rather extreme rating, "
+ +"meaning this game has absolutely nothing to offer, and that it's the worst game you have ever played.\n"
+ +"Are you really sure this visual novel matches that description?") });
// NSFW
cl('nsfw', function () {
@@ -277,8 +284,19 @@ DOMLoad(function() {
}
// form-stuff
- if(document.forms.length > 1)
+ if(document.forms.length > 1) {
formhid();
+ // edit summary warning
+ if(x('comm'))
+ document.forms[1].onsubmit = function () {
+ var z = x('comm');
+ if(z.value.length > 5) return true;
+ var y = prompt("Edit summary field is empty,\nPlease explain your edits and cite all sources!", z.value);
+ if(y == null) return false;
+ z.value = y;
+ return true;
+ };
+ }
// init dyna
if(window.dInit)