From: Wilfried Goesgens Date: Fri, 13 May 2011 09:41:02 +0000 (+0200) Subject: More compfort for inline vieweable attachments X-Git-Tag: v8.11~758 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=96a55a641f8f5ac47401be1635e8c3ecdf0ac893 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. --- 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