From cf862fbd6fb8fcec74f647de235ead837adf71f9 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 11 Jul 2019 13:21:51 +0200 Subject: [PATCH 1/2] Elastic: draw box around attachments list --- skins/elastic/styles/colors.less | 3 +++ skins/elastic/styles/widgets/forms.less | 3 ++- skins/elastic/styles/widgets/lists.less | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/skins/elastic/styles/colors.less b/skins/elastic/styles/colors.less index f7ad97e00..2e40a877e 100644 --- a/skins/elastic/styles/colors.less +++ b/skins/elastic/styles/colors.less @@ -93,6 +93,9 @@ @color-list-icon: fadeout(@color-list-secondary, 25%); @color-list-unread-status: @color-warning; +@color-attachmentlist-border: #f4f4f4; +@color-attachmentlist-background: #fcfcfc; + // Drag-n-drop layer @color-drag-layer: #fff; @color-drag-layer-background: @color-taskmenu-background; diff --git a/skins/elastic/styles/widgets/forms.less b/skins/elastic/styles/widgets/forms.less index 8a2694ab5..581210724 100644 --- a/skins/elastic/styles/widgets/forms.less +++ b/skins/elastic/styles/widgets/forms.less @@ -871,6 +871,7 @@ html.ms .propform { position: relative; display: flex; padding-right: 1.5em; + margin: 0.15em 0; a.filename { flex: 1; @@ -879,7 +880,7 @@ html.ms .propform { a.delete, a.cancelupload { position: absolute; - right: 0; + right: 0.25em; width: auto; // fix button width if the widget is in a .popupmenu &:before { diff --git a/skins/elastic/styles/widgets/lists.less b/skins/elastic/styles/widgets/lists.less index bb31e0ed7..5caa2703e 100644 --- a/skins/elastic/styles/widgets/lists.less +++ b/skins/elastic/styles/widgets/lists.less @@ -807,11 +807,20 @@ html.touch { padding: 0; margin: 0; + background-color: @color-attachmentlist-background; + border: 1px solid @color-attachmentlist-border; + + &:empty { + padding: 0; + border: 0; + } + li { list-style: none; display: inline-flex; white-space: nowrap; line-height: @attachmentslist-item-height; + padding: 0 .25em; max-width: 100%; &:before { From 00a867a05fafb0954d0f5ad4389e60d4acb83e0e Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 11 Jul 2019 13:28:43 +0200 Subject: [PATCH 2/2] Make attachment list :empty selector work --- program/steps/mail/compose.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 7569b07f2..99a4ec840 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1197,7 +1197,7 @@ function rcmail_compose_attachment_list($attrib) if (!$attrib['id']) $attrib['id'] = 'rcmAttachmentList'; - $out = "\n"; + $out = ""; $jslist = array(); $button = '';