changeset 168:cf3fef32a87b

arnica_slides: link aliastext/filenam to attachment file
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 14 Jul 2008 18:58:19 +0200
parents 3311d9f639cf
children 5ad37eeecc76
files data/plugin/action/arnica_slides.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Mon Jul 14 18:30:36 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Mon Jul 14 18:58:19 2008 +0200
@@ -65,6 +65,7 @@
 var rotate_delay = 5; // delay in milliseconds (5000 = 5 secs)
 var current = %(counter)s;
 var theImages = new Array();
+var AttachFile_action = '?action=AttachFile&do=get&target=';
 
 function arnica_preload() {
    var list = document.slideform.webnail_list.value;
@@ -86,10 +87,13 @@
 function arnica_add_comments() {
   var alias_text = document.slideform.alias.value;
   var exif_date_text = document.slideform.exif_date.value;
+  var original_images = document.slideform.original_images.value;
   var index = document.slideform.slide.selectedIndex;
   var alias = alias_text.split("|");
   var exif = exif_date_text.split("|");
-  document.getElementById("arnica_alias_text").innerHTML = alias[index];
+  images = original_images.split("|");
+
+  document.getElementById("arnica_alias_text").innerHTML = '<a href=' + document.URL + AttachFile_action + images[index] + '>' + alias[index] +'</a>';
   document.getElementById("arnica_exif_date_text").innerHTML = exif[index];
 }