From: Andrew Dolgov Date: Thu, 28 Mar 2013 06:56:29 +0000 (+0400) Subject: since dojo dropdowns won't work in article content because of html escaping trick... X-Git-Tag: 1.7.6~213 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f9432f2630e9340cd6a45842b453d3bf78ace0f7;p=tt-rss.git since dojo dropdowns won't work in article content because of html escaping trick, replace attachment dropdown with generic html controls --- 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); + } +}