From 96a55a641f8f5ac47401be1635e8c3ecdf0ac893 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Fri, 13 May 2011 11:41:02 +0200 Subject: [PATCH] More compfort for inline vieweable attachments - make it look similar to if it was just a view link which is downloaded binary and the browser shows it - this 'view' link now toggles the visibility of the inline rendered attachment - this makes viewing mails with text attachments more compact. --- webcit/static/t/view_message/inline_attach.html | 7 ++++--- webcit/static/wclib.js | 13 +++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/webcit/static/t/view_message/inline_attach.html b/webcit/static/t/view_message/inline_attach.html index 3243bced2..85ceffcee 100644 --- a/webcit/static/t/view_message/inline_attach.html +++ b/webcit/static/t/view_message/inline_attach.html @@ -1,8 +1,9 @@
" border="0" align="middle" alt=""> - (, bytes) -">
-
+ (, bytes) +[')">| +">]
+
" style="display:none">
diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js index 13a783492..cf409d363 100644 --- a/webcit/static/wclib.js +++ b/webcit/static/wclib.js @@ -47,6 +47,19 @@ function strcmp ( str1, str2 ) { return ( ( str1 == str2 ) ? 0 : ( ( str1 > str2 ) ? 1 : -1 ) ); } + + +function ToggleVisibility ($Which) +{ + if (document.getElementById) + { + if (document.getElementById($Which).style.display == "none") + document.getElementById($Which).style.display = "inline"; + else + document.getElementById($Which).style.display = "none"; + } +} + function emptyElement(element) { childNodes = element.childNodes; for(var i=0; i