--- trunk/web/browse.cgi 2005/11/14 16:16:57 54
+++ trunk/web/browse.cgi 2005/11/15 14:31:03 61
@@ -48,20 +48,19 @@
if (@ds && $#ds > 0) {
print qq{
- }, $out->apply(
+ }, $iconv_utf8->convert( $out->apply(
template => $template,
data => \@ds,
- ), qq{
+ ) ), qq{
-
-
};
@@ -71,13 +70,12 @@
Record $rec not found!
-
-
};
@@ -90,18 +88,26 @@
if ($q->param('save_template')) {
- my $tmpl = $q->param('tt_template') || die "no template?";
+ my $tmpl = $iconv_loc->convert( $q->param('tt_template') ) || die "no template?";
+ sub _conv_js {
+ my $t = shift || return;
+ return $iconv_loc->convert(chr(hex($t)));
+ }
+ $tmpl =~ s/%u([a-fA-F0-9]{4})/_conv_js($1)/gex;
+
my $tmpl_file = $out->{'include_path'} . '/' . $template;
- write_file($tmpl_file . '.new', $iconv_loc->convert($tmpl)) || die "can't save $tmpl_file: $!";
+ write_file($tmpl_file . '.new', $tmpl) || die "can't save $tmpl_file: $!";
rename $tmpl_file . '.new', $tmpl_file || die "can't rename to $tmpl_file: $!";
print qq{
-$template saved
+$template saved
@@ -117,9 +123,7 @@
}, Dumper($q->Vars), qq{
-
+
+
+
};
@@ -159,6 +170,11 @@
}
function load_rec(nr) {
+ if (nr == 1) {
+ iwfHide('a_left_arr', 1);
+ } else {
+ iwfShow('a_left_arr', 1);
+ }
update_status(nr+'...');
iwfRequest( url+'/xml/?rec='+nr, 'div_record' );
iwfOpacity('div_record', 30);
@@ -171,8 +187,10 @@
}
function dec_rec() {
- rec--;
- load_rec(rec);
+ if (rec > 1) {
+ rec--;
+ load_rec(rec);
+ }
return false;
}
@@ -198,12 +216,12 @@