This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
commit 7890023f81c8a9924f4ba73f63d3a9c2d1cdddda Author: Sebb <[email protected]> AuthorDate: Wed Dec 1 17:41:12 2021 +0000 Display of listname on search list This relates to #166 --- webui/js/source/listview-flat.js | 18 ++++++++++++++++++ webui/js/source/listview-threaded.js | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/webui/js/source/listview-flat.js b/webui/js/source/listview-flat.js index 7fcf169..f42138d 100644 --- a/webui/js/source/listview-flat.js +++ b/webui/js/source/listview-flat.js @@ -89,6 +89,18 @@ function listview_flat_element(eml, idx) { }, authorName); element.inject(author); + // reasons to show the list name + let showList = G_current_domain == 'inbox' || G_current_list == '*' || G_current_domain == '*'; + + // If space and needed, inject ML name + if (!G_current_listmode_compact && showList) { + author.style.lineHeight = '16px'; + author.inject(new HTML('br')); + author.inject(new HTML('span', { + class: "label label-primary", + style: "font-style: italic; font-size: 1rem;" + }, eml.list_raw.replace(/[<>]/g, '').replace('.', '@', 1))); + } // Combined space for subject + body teaser let as = new HTML('div', { @@ -96,6 +108,12 @@ function listview_flat_element(eml, idx) { }); let suba = new HTML('a', {}, eml.subject === '' ? '(No subject)' : eml.subject); + if (G_current_listmode_compact && showList) { + let kbd = new HTML('kbd', { + class: 'listview_kbd' + }, eml.list_raw.replace(/[<>]/g, '').replace('.', '@', 1)) + suba = [kbd, suba]; + } let subject = new HTML('div', { class: 'listview_email_subject email_unread' }, suba); diff --git a/webui/js/source/listview-threaded.js b/webui/js/source/listview-threaded.js index 26c6464..3c5b91a 100644 --- a/webui/js/source/listview-threaded.js +++ b/webui/js/source/listview-threaded.js @@ -133,8 +133,11 @@ function listview_threaded_element(thread, idx) { }, authorName); element.inject(author); - // If needed, inject ML name - if (G_current_domain == 'inbox' || G_current_list == '*') { + // reasons to show the list name + let showList = G_current_domain == 'inbox' || G_current_list == '*' || G_current_domain == '*'; + + // If space and needed, inject ML name + if (!G_current_listmode_compact && showList) { author.style.lineHeight = '16px'; author.inject(new HTML('br')); author.inject(new HTML('span', {
