From f9432f2630e9340cd6a45842b453d3bf78ace0f7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 28 Mar 2013 10:56:29 +0400 Subject: [PATCH] since dojo dropdowns won't work in article content because of html escaping trick, replace attachment dropdown with generic html controls --- include/functions.php | 12 +++++++----- js/viewfeed.js | 13 +++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/include/functions.php b/include/functions.php index dae87dab..dcaa67e5 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3693,13 +3693,15 @@ $rv .= "
"; } - $rv .= "
". - "" . __('Attachments').""; - $rv .= "
"; + $rv .= ""; } return $rv; diff --git a/js/viewfeed.js b/js/viewfeed.js index 28d4ea8e..1d04c427 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); + } +} -- 2.39.5