summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-05 20:50:04 +0200
committerYorhel <git@yorhel.nl>2009-10-05 20:55:11 +0200
commit519b13787e33f1b8edb3d0f3b018339410b48371 (patch)
tree3d865f8aeffed1833c63bf56064df5e4d0aff90b /lib
parentfd24d5f1f95eb4285ddb938101275f66d1fdb544 (diff)
JS: Moved, split and rewrote release <-> VN & producer linking
+ removed last traces of forms.js + converted code to use tables, as that is easier to expand more accurate for this purpose. The reason I probably didn't use tables before was that the innerHTML property doesn't work on tr elements. The split was mainly because the producer linking is going to be expanded with an additional field later on.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/Releases.pm16
-rw-r--r--lib/VNDB/Handler/Tags.pm2
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm2
-rw-r--r--lib/VNDB/Handler/VNEdit.pm2
-rw-r--r--lib/VNDB/Util/LayoutHTML.pm4
5 files changed, 11 insertions, 15 deletions
diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm
index f0daa4cb..e7442845 100644
--- a/lib/VNDB/Handler/Releases.pm
+++ b/lib/VNDB/Handler/Releases.pm
@@ -370,7 +370,7 @@ sub edit {
$frm->{original} = $v->{original} if !defined $frm->{original} && !$r;
my $title = mt $rid ? ($copy ? '_redit_title_copy' : '_redit_title_edit', $r->{title}) : ('_redit_title_add', $v->{title});
- $self->htmlHeader(js => 'forms', title => $title, noindex => 1);
+ $self->htmlHeader(title => $title, noindex => 1);
$self->htmlMainTabs('r', $r, $copy ? 'copy' : 'edit') if $rid;
$self->htmlMainTabs('v', $v, 'edit') if $vid;
$self->htmlEditMessage('r', $r, $title, $copy);
@@ -446,12 +446,11 @@ sub _form {
[ hidden => short => 'producers' ],
[ static => nolabel => 1, content => sub {
h2 mt('_redit_form_prod_sel');
- div id => 'producerssel';
- end;
+ table; tbody id => 'producer_tbl'; end; end;
h2 mt('_redit_form_prod_add');
div;
- input type => 'text', class => 'text';
- a href => '#', 'add';
+ input id => 'producer_input', type => 'text', class => 'text';
+ a id => 'producer_add', href => '#', 'add';
end;
}],
],
@@ -460,12 +459,11 @@ sub _form {
[ hidden => short => 'vn' ],
[ static => nolabel => 1, content => sub {
h2 mt('_redit_form_vn_sel');
- div id => 'vnsel';
- end;
+ table; tbody id => 'vn_tbl'; end; end;
h2 mt('_redit_form_vn_add');
div;
- input type => 'text', class => 'text';
- a href => '#', 'add';
+ input id => 'vn_input', type => 'text', class => 'text';
+ a href => '#', id => 'vn_add', 'add';
end;
}],
],
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index 0f8b780a..6a13446b 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -422,7 +422,7 @@ sub vntagmod {
my $frm;
my $title = mt '_tagv_title', $v->{title};
- $self->htmlHeader(title => $title, noindex => 1, js => 'forms');
+ $self->htmlHeader(title => $title, noindex => 1);
$self->htmlMainTabs('v', $v, 'tagmod');
div class => 'mainbox';
h1 $title;
diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm
index 2a6d6cd7..b0c948cd 100644
--- a/lib/VNDB/Handler/VNBrowse.pm
+++ b/lib/VNDB/Handler/VNBrowse.pm
@@ -70,7 +70,7 @@ sub list {
$self->resRedirect('/v'.$list->[0]{id}, 'temp')
if $f->{q} && @$list == 1;
- $self->htmlHeader(title => mt('_vnbrowse_title'), search => $f->{q}, js => 'forms');
+ $self->htmlHeader(title => mt('_vnbrowse_title'), search => $f->{q});
_filters($self, $f, $char, \@ignored);
my $url = "/v/$char?q=$f->{q};ti=$f->{ti};te=$f->{te}";
diff --git a/lib/VNDB/Handler/VNEdit.pm b/lib/VNDB/Handler/VNEdit.pm
index e618b360..8430156d 100644
--- a/lib/VNDB/Handler/VNEdit.pm
+++ b/lib/VNDB/Handler/VNEdit.pm
@@ -97,7 +97,7 @@ sub edit {
$frm->{editsum} = sprintf 'Reverted to revision v%d.%d', $vid, $rev if $rev && !defined $frm->{editsum};
my $title = $vid ? mt('_vnedit_title_edit', $v->{title}) : mt '_vnedit_title_add';
- $self->htmlHeader(js => 'forms', title => $title, noindex => 1);
+ $self->htmlHeader(title => $title, noindex => 1);
$self->htmlMainTabs('v', $v, 'edit') if $vid;
$self->htmlEditMessage('v', $v, $title);
_form($self, $v, $frm);
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm
index 99b615b5..524b6258 100644
--- a/lib/VNDB/Util/LayoutHTML.pm
+++ b/lib/VNDB/Util/LayoutHTML.pm
@@ -10,11 +10,10 @@ use VNDB::Func;
our @EXPORT = qw|htmlHeader htmlFooter|;
-sub htmlHeader { # %options->{ title, js, noindex, search }
+sub htmlHeader { # %options->{ title, noindex, search }
my($self, %o) = @_;
my $skin = $self->reqParam('skin') || $self->authInfo->{skin} || $self->{skin_default};
$skin = $self->{skin_default} if !$self->{skins}{$skin} || !-d "$VNDB::ROOT/static/s/$skin";
- $self->{js} = $o{js}; # save for use in htmlFooter
# heading
html;
@@ -159,7 +158,6 @@ sub htmlFooter {
end;
end; # /div maincontent
script type => 'text/javascript', src => $self->{url_static}.'/f/script.js?'.$self->{version}, '';
- script type => 'text/javascript', src => $self->{url_static}.'/f/forms.js?'.$self->{version}, '' if $self->{js};
end; # /body
end; # /html