]> git.sesse.net Git - pr0n/commitdiff
Implement access keys.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 25 Dec 2006 16:05:46 +0000 (17:05 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 25 Dec 2006 16:05:46 +0000 (17:05 +0100)
perl/Sesse/pr0n/Common.pm
perl/Sesse/pr0n/Index.pm
templates/default/footer
templates/default/nextaccesskey [new file with mode: 0644]
templates/default/prevaccesskey [new file with mode: 0644]
templates/skoyen.bilder.knatten.com/footer
templates/skoyen.bildereks.knatten.com/footer

index 1c864fc6d8a88b07ad5b599cfa54b8389ff9671d..e3b33324bcb8de120b80187cc777360d6deb63c5 100644 (file)
@@ -134,8 +134,12 @@ sub get_query_string {
 }
 
 sub print_link {
 }
 
 sub print_link {
-       my ($r, $title, $baseurl, $param, $defparam) = @_;
-       my $str = "<a href=\"$baseurl" . get_query_string($param, $defparam) . "\">$title</a>";
+       my ($r, $title, $baseurl, $param, $defparam, $accesskey) = @_;
+       my $str = "<a href=\"$baseurl" . get_query_string($param, $defparam) . "\"";
+       if (defined($accesskey) && length($accesskey) == 1) {
+               $str .= " accesskey=\"$accesskey\"";
+       }
+       $str .= ">$title</a>";
        $r->print($str);
 }
 
        $r->print($str);
 }
 
index 88affa1df0df74aaf6f6aa45d71868918c0465ac..5aa3138bd8d5695cc2e087563cafc5ce024cb99b 100644 (file)
@@ -437,7 +437,8 @@ sub print_nextprev {
                my %newsettings = %$settings;
                $newsettings{'start'} = $newstart;
                chomp (my $title = Sesse::pr0n::Templates::fetch_template($r, 'prevpage'));
                my %newsettings = %$settings;
                $newsettings{'start'} = $newstart;
                chomp (my $title = Sesse::pr0n::Templates::fetch_template($r, 'prevpage'));
-               Sesse::pr0n::Common::print_link($r, "$title ($newstart-$newend)\n", "/$event/", \%newsettings, $defsettings);
+               chomp (my $accesskey = Sesse::pr0n::Templates::fetch_template($r, 'prevaccesskey'));
+               Sesse::pr0n::Common::print_link($r, "$title ($newstart-$newend)\n", "/$event/", \%newsettings, $defsettings, $accesskey);
        }
 
        # This
        }
 
        # This
@@ -455,7 +456,8 @@ sub print_nextprev {
                my %newsettings = %$settings;
                $newsettings{'start'} = $newstart;
                chomp (my $title = Sesse::pr0n::Templates::fetch_template($r, 'nextpage'));
                my %newsettings = %$settings;
                $newsettings{'start'} = $newstart;
                chomp (my $title = Sesse::pr0n::Templates::fetch_template($r, 'nextpage'));
-               Sesse::pr0n::Common::print_link($r, "$title ($newstart-$newend)", "/$event/", \%newsettings, $defsettings);
+               chomp (my $accesskey = Sesse::pr0n::Templates::fetch_template($r, 'nextaccesskey'));
+               Sesse::pr0n::Common::print_link($r, "$title ($newstart-$newend)", "/$event/", \%newsettings, $defsettings, $accesskey);
        }
 
        $r->print("    </p>\n");
        }
 
        $r->print("    </p>\n");
index 71655f50981d2f933c62fe15f924ee2c5a40f24e..8b312a6175795b1a77326ea87822aaa9aeafca42 100644 (file)
@@ -2,7 +2,7 @@
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
-      <a href="/faq.html">FAQ</a> for more information.</p>
+      <a href="/faq.html" accesskey="5">FAQ</a> for more information.</p>
   </body>
 </html>
 
   </body>
 </html>
 
diff --git a/templates/default/nextaccesskey b/templates/default/nextaccesskey
new file mode 100644 (file)
index 0000000..8ba3a16
--- /dev/null
@@ -0,0 +1 @@
+n
diff --git a/templates/default/prevaccesskey b/templates/default/prevaccesskey
new file mode 100644 (file)
index 0000000..1a9cc2b
--- /dev/null
@@ -0,0 +1 @@
+p
index 71655f50981d2f933c62fe15f924ee2c5a40f24e..8b312a6175795b1a77326ea87822aaa9aeafca42 100644 (file)
@@ -2,7 +2,7 @@
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
-      <a href="/faq.html">FAQ</a> for more information.</p>
+      <a href="/faq.html" accesskey="5">FAQ</a> for more information.</p>
   </body>
 </html>
 
   </body>
 </html>
 
index 71655f50981d2f933c62fe15f924ee2c5a40f24e..8b312a6175795b1a77326ea87822aaa9aeafca42 100644 (file)
@@ -2,7 +2,7 @@
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
     <p class="footer">pr0n %VERSION%,
       &copy; 2004-2006 <a href="http://www.sesse.net/">Steinar H. Gunderson</a>. All images
       are copyright their respective owners; please see the
-      <a href="/faq.html">FAQ</a> for more information.</p>
+      <a href="/faq.html" accesskey="5">FAQ</a> for more information.</p>
   </body>
 </html>
 
   </body>
 </html>