mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Moving to structure where click on td is counted as seen
This commit is contained in:
parent
0b89598f39
commit
3680e03cdb
1 changed files with 7 additions and 10 deletions
|
@ -31,19 +31,20 @@
|
|||
<table class="table table-sm table-responsive-md">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30px"></th>
|
||||
<th width="165px">Date</th>
|
||||
<th>Message</th>
|
||||
<th width="70px"> </th>
|
||||
<th width="70px"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model.Items)
|
||||
{
|
||||
@* TODO: Multiselect akin to Gmail *@
|
||||
<tr onclick="rowseen(this)" data-guid="@item.Id">
|
||||
<td class="cursor-pointer @(item.Seen ? "": "font-weight-bold")">@item.Created.ToBrowserDate()</td>
|
||||
<td class="cursor-pointer @(item.Seen ? "": "font-weight-bold")">@item.Body</td>
|
||||
<tr data-guid="@item.Id">
|
||||
<td><input type="checkbox" class="selector" data-guid="@item.Id" /></td>
|
||||
<td onclick="rowseen(this)" class="cursor-pointer @(item.Seen ? "": "font-weight-bold")">@item.Created.ToBrowserDate()</td>
|
||||
<td onclick="rowseen(this)" class="cursor-pointer @(item.Seen ? "": "font-weight-bold")">@item.Body</td>
|
||||
<td>
|
||||
@if (!String.IsNullOrEmpty(item.ActionLink))
|
||||
{
|
||||
|
@ -54,9 +55,6 @@
|
|||
<span> </span>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" onclick="return confirm('Are you sure you want to delete this notification');"><span class="fa fa-trash-o" title="Delete"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
@ -74,10 +72,9 @@
|
|||
<script type="text/javascript">
|
||||
function rowseen(sender) {
|
||||
var weightClassName = "font-weight-bold";
|
||||
$(sender).children().eq(0).toggleClass(weightClassName);
|
||||
$(sender).children().eq(1).toggleClass(weightClassName);
|
||||
$(sender).parent().children(".cursor-pointer").toggleClass(weightClassName);
|
||||
|
||||
$.post("/Notifications/FlipRead/" + $(sender).data("guid"), function (data) {
|
||||
$.post("/Notifications/FlipRead/" + $(sender).parent().data("guid"), function (data) {
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue