summaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorJohn Olheiser <john.olheiser@gmail.com>2023-03-25 14:37:34 -0500
committerGitHub <noreply@github.com>2023-03-25 14:37:34 -0500
commit73b4010fcd93e921b626a6f51de7a148de276283 (patch)
tree174de0120d013823b67d25736f1acce2cf2fa13b /web_src
parentde5b368bca20122e374a81efcdf81caae5e33f2c (diff)
downloadgitea-73b4010fcd93e921b626a6f51de7a148de276283.tar.gz
gitea-73b4010fcd93e921b626a6f51de7a148de276283.zip
Remove row clicking from notification table (#22695)
Resolves #22692 I don't think there's a need for this entire row to be clickable (and even different links depending on which segment you click) The links still point to the same spot, so no information is lost here. --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r--web_src/css/user.css33
-rw-r--r--web_src/js/features/common-global.js15
2 files changed, 14 insertions, 34 deletions
diff --git a/web_src/css/user.css b/web_src/css/user.css
index 8722181c29..620f1da0e2 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 3546a052b3..a10ca74ab5 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 <tr> and <td> 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 <a>, then the <tr> or <td> 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');