You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/01 17:51:37 UTC
[incubator-ponymail-foal] 01/03: Display of listname on search list
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 <se...@apache.org>
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', {
Re: [incubator-ponymail-foal] 01/03: Display of listname on search list
Posted by sebb <se...@gmail.com>.
On Thu, 2 Dec 2021 at 00:11, Daniel Gruno <hu...@apache.org> wrote:
>
> On 01/12/2021 18.51, sebb@apache.org wrote:
> > 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 <se...@apache.org>
> > 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;"
>
> Using the style element like this is not supported by all browsers (as
> it's technically not the proper way). I would suggest having it as a
> dictionary instead:
> style: { fontStyle: "italic", fontSize: "1rem"}
That is not my code.
I merely copied existing code from listview-threaded-element.
> > + }, 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', {
> >
>
Re: [incubator-ponymail-foal] 01/03: Display of listname on search list
Posted by Daniel Gruno <hu...@apache.org>.
On 01/12/2021 18.51, sebb@apache.org wrote:
> 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 <se...@apache.org>
> 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;"
Using the style element like this is not supported by all browsers (as
it's technically not the proper way). I would suggest having it as a
dictionary instead:
style: { fontStyle: "italic", fontSize: "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', {
>