summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-12-28 19:37:44 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-12-28 19:37:44 +0100
commit9d50015682975f1f70e22b4814fe7bf200c60679 (patch)
treeff02bb06fbeeb0e4945d6b42a01edbbfd73326b2 /templates
parentad67f341ecec4b56dca28181b570036a1095ded6 (diff)
downloadcataract-9d50015682975f1f70e22b4814fe7bf200c60679.tar.xz
Preload next image
(active by default)
Diffstat (limited to 'templates')
-rw-r--r--templates/scripts-general.js6
-rw-r--r--templates/template-view_photo.tmpl2
2 files changed, 7 insertions, 1 deletions
diff --git a/templates/scripts-general.js b/templates/scripts-general.js
index df53bfc..c371bfa 100644
--- a/templates/scripts-general.js
+++ b/templates/scripts-general.js
@@ -13,3 +13,9 @@ function set_exif_table_visibility (visible) {
document.getElementById('exif_table').style.display = visible == "yes" ? 'block' : 'none';
document.getElementById('exif_line').style.display = visible == "yes" ? 'none' : 'block';
}
+
+function preload_image (src) {
+ img = new Image();
+ img.src = src;
+}
+
diff --git a/templates/template-view_photo.tmpl b/templates/template-view_photo.tmpl
index 7185492..dafff32 100644
--- a/templates/template-view_photo.tmpl
+++ b/templates/template-view_photo.tmpl
@@ -8,7 +8,7 @@
<link href="styles.css" type="text/css" rel="stylesheet" media="screen, print" />
<script type="text/javascript" src="scripts-general.js"> </script>
</head>
-<body onload="read_exif_table_cookie();">
+<body onload="javascript: read_exif_table_cookie(); preload_image('$(IMG_SRC_PRELOAD)');">
<!-- ## Navigation bar -->