OSDN Git Service

page caching on desktop jpeg view.
authorgn64_jp <gn64@rec10.org>
Sun, 19 May 2013 07:02:15 +0000 (16:02 +0900)
committergn64_jp <gn64@rec10.org>
Sun, 19 May 2013 07:02:15 +0000 (16:02 +0900)
htmlserver.pl
template/desktop_viewjpeg.tmp.html

index d387627..4549800 100755 (executable)
@@ -111,7 +111,7 @@ else {
        $bpage = $pagenum - 2;
        $blink =
 "htmlserver.pl?title=$title_uri&mode=$mode&width=$width&height=$height&pagenum=$bpage";
-       $npage = $pagenum + 2;
+    $npage = $pagenum + 2;
        $nlink =
 "htmlserver.pl?title=$title_uri&mode=$mode&width=$width&height=$height&pagenum=$npage";
        $blink   = "$blink";
@@ -124,13 +124,30 @@ else {
        $single_pagenum2=$single_pagenum+1;
        $jpeglink2 =
 "jpegserver.pl?pdfpath=\"$pdfpath\"&pagenum=$single_pagenum2&mode=$mode&height=$height&width=$width";
+       $blink_jpegnum=$single_pagenum-2;
+       $blink_jpeg=
+"jpegserver.pl?pdfpath=\"$pdfpath\"&pagenum=$blink_jpegnum&mode=$mode&height=$height&width=$width";
+       $blink_jpegnum=$single_pagenum-1;
+       $blink_jpeg2=
+"jpegserver.pl?pdfpath=\"$pdfpath\"&pagenum=$blink_jpegnum&mode=$mode&height=$height&width=$width";
+    $nlink_jpegnum=$single_pagenum+2;
+    $nlink_jpeg=
+"jpegserver.pl?pdfpath=\"$pdfpath\"&pagenum=$nlink_jpegnum&mode=$mode&height=$height&width=$width";    
+    $nlink_jpegnum=$single_pagenum+3;
+    $nlink_jpeg2=
+"jpegserver.pl?pdfpath=\"$pdfpath\"&pagenum=$nlink_jpegnum&mode=$mode&height=$height&width=$width";    
        $template =
          HTML::Template::Pro->new(
                filename => './template/desktop_viewjpeg.tmp.html' );
        $template->param( blink      => $blink );
+       $template->param( blink_jpeg => $blink_jpeg);
+       $template->param( blink_jpeg2 => $blink_jpeg2);
        $template->param( nlink      => $nlink );
+    $template->param( nlink_jpeg => $nlink_jpeg);
+    $template->param( nlink_jpeg2 => $nlink_jpeg2);
        $template->param( b10link    => $b10link );
        $template->param( n10link    => $n10link );
+       #$template->param( cache_blink_data => $cache_blink_data);
        $template->param( jpegpath   => $jpeglink );
        $template->param( jpegpath2  => $jpeglink2 );
        $template->param( jumplink   => $jumplink );
index e89d28b..3ecc629 100644 (file)
                                        image1.stop(true).animate({width:image_width_size + "%"},250);
                                        image2.stop(true).animate({width:image_width_size + "%"},250);
                                });
-                
                        });
+                       window.onload = function(){
+                $.get('<TMPL_VAR NAME="blink">');
+                $.get('<TMPL_VAR NAME="nlink">');
+                $.get('<TMPL_VAR NAME="blink_jpeg">');
+                $.get('<TMPL_VAR NAME="blink_jpeg2">');
+                       $.get('<TMPL_VAR NAME="nlink_jpeg">');
+                $.get('<TMPL_VAR NAME="nlink_jpeg2">');                        
+                       };
                });
+
        </script>
        <script type='text/css'>