Skip to content

Commit dfc6547

Browse files
wxiaoguangjolheiser
authored andcommitted
fix
1 parent 3dcd247 commit dfc6547

File tree

3 files changed

+16
-36
lines changed

3 files changed

+16
-36
lines changed

templates/user/notification/notification_div.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{{$issue := .Issue}}
3636
{{$repo := .Repository}}
3737
<tr id="notification_{{.ID}}">
38-
<td class="collapsing gt-pl-4" data-href="{{.Link}}">
38+
<td class="collapsing gt-pl-4">
3939
{{if eq .Status 3}}
4040
{{svg "octicon-pin" 16 "text blue"}}
4141
{{else if not $issue}}
@@ -58,7 +58,7 @@
5858
{{end}}
5959
{{end}}
6060
</td>
61-
<td class="eleven wide" data-href="{{.Link}}">
61+
<td class="eleven wide">
6262
<a class="item" href="{{.Link}}">
6363
{{if $issue}}
6464
#{{$issue.Index}} - {{$issue.Title}}

web_src/css/user.css

+14-19
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,6 @@
9090
padding: 8px 15px;
9191
}
9292

93-
.user.notification .content {
94-
float: left;
95-
margin-left: 7px;
96-
}
97-
98-
.user.notification table form {
99-
display: inline-block;
100-
}
101-
102-
.user.notification table button {
103-
padding: 3px 3px 3px 5px;
104-
}
105-
106-
.user.notification table tr {
107-
cursor: pointer;
108-
}
109-
11093
.user .button.adopt,
11194
.user .button.delete {
11295
margin-top: -15px;
@@ -152,15 +135,27 @@
152135
object-fit: contain;
153136
}
154137

138+
.user.notification table button {
139+
padding: 3px 3px 3px 5px;
140+
}
141+
155142
#notification_div .tab.segment {
156143
overflow-x: auto;
157-
padding: 0;
158144
}
159145

160-
#notification_div .menu .active.item {
146+
#notification_div .tabular.menu .active.item {
161147
background: var(--color-box-body);
162148
}
163149

164150
#notification_table {
165151
border: none;
166152
}
153+
154+
#notification_table tr {
155+
cursor: default;
156+
}
157+
158+
#notification_table td a {
159+
width: 100%;
160+
display: inline-block;
161+
}

web_src/js/features/common-global.js

-15
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,6 @@ export function initGlobalCommon() {
124124
toggleElem($($(this).data('target')));
125125
});
126126

127-
// make table <tr> and <td> elements clickable like a link
128-
$('tr[data-href], td[data-href]').on('click', function (e) {
129-
const href = $(this).data('href');
130-
if (e.target.nodeName === 'A') {
131-
// if a user clicks on <a>, then the <tr> or <td> should not act as a link.
132-
return;
133-
}
134-
if (e.ctrlKey || e.metaKey) {
135-
// ctrl+click or meta+click opens a new window in modern browsers
136-
window.open(href);
137-
} else {
138-
window.location = href;
139-
}
140-
});
141-
142127
// prevent multiple form submissions on forms containing .loading-button
143128
document.addEventListener('submit', (e) => {
144129
const btn = e.target.querySelector('.loading-button');

0 commit comments

Comments
 (0)