From: Art Cancro Date: Sun, 24 Sep 2023 21:00:37 +0000 (-0400) Subject: view_mail.js: convert ugly syntax to heredocs X-Git-Tag: v995~11 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=6e3ec0c24447d56ce20240ef1a2dd0a0dfff6e0b;p=citadel.git view_mail.js: convert ugly syntax to heredocs --- diff --git a/webcit-ng/static/css/webcit.css b/webcit-ng/static/css/webcit.css index 57a611ef5..1ffb787b1 100644 --- a/webcit-ng/static/css/webcit.css +++ b/webcit-ng/static/css/webcit.css @@ -648,6 +648,10 @@ blockquote pre { align-content: start } +.ctdl_dfhtu { /* "Drop Files Here To Upload" text */ + text-align: center; +} + .ctdl-login-screen-grid-container { display: grid; grid-template-columns: auto auto; diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 8fac46efa..28e870872 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -507,17 +507,16 @@ function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subjec compose_screen += "

"; } - compose_screen += - "" - - // The button bar is a Grid element, and is also a Flexbox container. - + "
" - + " " + _("Send message") + "" - + "" + _("Save to Drafts") + "" - + " " + _("Attachments:") + " " + num_attachments + "" - + "" + _("Contacts") + "" - + " " + _("Cancel") + "" - + "
" + // The button bar is a Grid element, and is also a Flexbox container. + compose_screen += ` + +
+ ` + _("Send message") + ` + ` + _("Save to Drafts") + ` + ` + _("Attachments:") + `` + num_attachments + ` + ` + _("Contacts") + ` + ` + _("Cancel") + ` +
` ; document.getElementById("ctdl-main").innerHTML = compose_screen; @@ -526,20 +525,6 @@ function mail_compose(is_quoted, references, quoted_msgnum, m_to, m_cc, m_subjec document.getElementById("ctdl-compose-cc-label").style.display = "block"; document.getElementById("ctdl-compose-cc-field").style.display = "block"; } - - // Now the compose screen is set up properly; set up the attachments modal in case the user wants it - - document.getElementById("ctdl_big_modal").innerHTML = "" - + "
" - + "
" - + "

" + _("Attachments:") + "

" - + "

" - + "
" - + "
" - + "this is the attachments modal. there are many like it, but this one is mine." - + "
" - ; - } @@ -551,12 +536,27 @@ function show_or_hide_attachments() { } else { document.getElementById("ctdl_big_modal").style.display = "block"; + document.getElementById("ctdl_big_modal").innerHTML = ` +
+
+

` + _("Attachments:") + " " + num_attachments + `

+

+
+
+ ` + _("Drop files here to upload") + ` +
+ +
` + ; document.getElementById("ctdl_attachments_outer").style.width = Math.trunc((document.getElementById("ctdl-editor-body").getBoundingClientRect().width) * 0.90).toString() + "px"; document.getElementById("ctdl_attachments_outer").style.height = Math.trunc((document.getElementById("ctdl-editor-body").getBoundingClientRect().height) * 0.90).toString() + "px"; } - }