From 947498c241d46071c8fd7debf45a9a4ae8c06603 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 31 Jan 2023 11:56:41 -0600 Subject: [PATCH 1/6] chore: remove data-href from notification table --- templates/user/notification/notification_div.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 7c9f4d4a9be4e..168466779edb5 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -35,7 +35,7 @@ {{$issue := .Issue}} {{$repo := .Repository}} - + {{if eq .Status 3}} {{svg "octicon-pin"}} {{else if not $issue}} @@ -58,7 +58,7 @@ {{end}} {{end}} - + {{if $issue}} #{{$issue.Index}} - {{$issue.Title}} @@ -67,7 +67,7 @@ {{end}} - + {{$repo.FullName}} From b4b57855d33ce7ab201ff10895e72bfee5a51222 Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 31 Jan 2023 12:01:44 -0600 Subject: [PATCH 2/6] chore: remove selectable class --- templates/user/notification/notification_div.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 168466779edb5..84a3219b06ffb 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -29,7 +29,7 @@ {{.locale.Tr "notification.no_read"}} {{end}} {{else}} - +
{{range $notification := .Notifications}} {{$issue := .Issue}} From c1569c29d09d1ea63c64d613102ddd298ef745dc Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Tue, 31 Jan 2023 12:02:54 -0600 Subject: [PATCH 3/6] chore: remove pointer from notification table --- web_src/less/_user.less | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web_src/less/_user.less b/web_src/less/_user.less index eb9e791d86e87..55327539576db 100644 --- a/web_src/less/_user.less +++ b/web_src/less/_user.less @@ -126,10 +126,6 @@ button { padding: 3px 3px 3px 5px; } - - tr { - cursor: pointer; - } } } From 47669e5486cc2477fbe2ba4aedf7c51266573480 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 31 Jan 2023 22:51:46 -0600 Subject: [PATCH 4/6] fix: make take up more room Signed-off-by: jolheiser --- templates/user/notification/notification_div.tmpl | 2 +- web_src/less/_user.less | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 84a3219b06ffb..168466779edb5 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -29,7 +29,7 @@ {{.locale.Tr "notification.no_read"}} {{end}} {{else}} -
+
{{range $notification := .Notifications}} {{$issue := .Issue}} diff --git a/web_src/less/_user.less b/web_src/less/_user.less index 55327539576db..d52f79f600701 100644 --- a/web_src/less/_user.less +++ b/web_src/less/_user.less @@ -126,6 +126,11 @@ button { padding: 3px 3px 3px 5px; } + + a { + width: 100%; + display: inline-block; + } } } From dfc6547d828dfeecf435badbe1f7fe6fafb42b80 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 24 Mar 2023 22:59:57 +0800 Subject: [PATCH 5/6] fix --- .../user/notification/notification_div.tmpl | 4 +-- web_src/css/user.css | 33 ++++++++----------- web_src/js/features/common-global.js | 15 --------- 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 9a4fbe786eab9..66b8a17f61af6 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -35,7 +35,7 @@ {{$issue := .Issue}} {{$repo := .Repository}} - - and or -
+ {{if eq .Status 3}} {{svg "octicon-pin" 16 "text blue"}} {{else if not $issue}} @@ -58,7 +58,7 @@ {{end}} {{end}} + {{if $issue}} #{{$issue.Index}} - {{$issue.Title}} diff --git a/web_src/css/user.css b/web_src/css/user.css index 8722181c29071..620f1da0e2faa 100644 --- a/web_src/css/user.css +++ b/web_src/css/user.css @@ -90,23 +90,6 @@ padding: 8px 15px; } -.user.notification .content { - float: left; - margin-left: 7px; -} - -.user.notification table form { - display: inline-block; -} - -.user.notification table button { - padding: 3px 3px 3px 5px; -} - -.user.notification table tr { - cursor: pointer; -} - .user .button.adopt, .user .button.delete { margin-top: -15px; @@ -152,15 +135,27 @@ object-fit: contain; } +.user.notification table button { + padding: 3px 3px 3px 5px; +} + #notification_div .tab.segment { overflow-x: auto; - padding: 0; } -#notification_div .menu .active.item { +#notification_div .tabular.menu .active.item { background: var(--color-box-body); } #notification_table { border: none; } + +#notification_table tr { + cursor: default; +} + +#notification_table td a { + width: 100%; + display: inline-block; +} diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js index 3546a052b32dd..a10ca74ab535d 100644 --- a/web_src/js/features/common-global.js +++ b/web_src/js/features/common-global.js @@ -124,21 +124,6 @@ export function initGlobalCommon() { toggleElem($($(this).data('target'))); }); - // make table
elements clickable like a link - $('tr[data-href], td[data-href]').on('click', function (e) { - const href = $(this).data('href'); - if (e.target.nodeName === 'A') { - // if a user clicks on , then the
should not act as a link. - return; - } - if (e.ctrlKey || e.metaKey) { - // ctrl+click or meta+click opens a new window in modern browsers - window.open(href); - } else { - window.location = href; - } - }); - // prevent multiple form submissions on forms containing .loading-button document.addEventListener('submit', (e) => { const btn = e.target.querySelector('.loading-button'); From 5dc42c56e7bfc41be7659a4503d17a005c2ac772 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Fri, 24 Mar 2023 10:58:00 -0500 Subject: [PATCH 6/6] fix: remove data-href from td Signed-off-by: jolheiser --- templates/user/notification/notification_div.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl index 66b8a17f61af6..101e4d24e46b8 100644 --- a/templates/user/notification/notification_div.tmpl +++ b/templates/user/notification/notification_div.tmpl @@ -67,7 +67,7 @@ {{end}} + {{$repo.FullName}}