diff --git a/include/functions.php b/include/functions.php
index dae87dab3..dcaa67e56 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -3693,13 +3693,15 @@
$rv .= "
";
}
- $rv .= "
".
- "
" . __('Attachments')."";
- $rv .= "
";
+ $rv .= "
";
+ };
+
+ $rv .= "";
}
return $rv;
diff --git a/js/viewfeed.js b/js/viewfeed.js
index 28d4ea8ec..1d04c4276 100644
--- a/js/viewfeed.js
+++ b/js/viewfeed.js
@@ -2115,3 +2115,16 @@ function displayArticleUrl(id) {
}
}
+function openSelectedAttachment(elem) {
+ try {
+ var url = elem[elem.selectedIndex].value;
+
+ if (url) {
+ window.open(url);
+ elem.selectedIndex = 0;
+ }
+
+ } catch (e) {
+ exception_error("openSelectedAttachment", e);
+ }
+}