double click edit + tooltips

This commit is contained in:
2026-03-03 14:45:53 +01:00
parent 4cdfbace03
commit 5ed4ca19fc
4 changed files with 18 additions and 8 deletions

View File

@@ -80,7 +80,7 @@
<tbody>
@foreach (var item in Model.Project)
{
<tr data-idproject="@item.IdProject" data-title="@item.Title">
<tr data-idproject="@item.IdProject" data-title="@item.Title" data-href="@Url.Page("Edit", new { id = item.IdProject })" style="cursor:pointer;">
<td>
@Html.DisplayFor(modelItem => item.ProjectNumberFormatted)
</td>
@@ -133,6 +133,10 @@
<script>
$('[data-toggle="tooltip"]').tooltip({container: 'table'});
$('table tbody tr').on('dblclick', function () {
window.location.href = $(this).data('href');
});
function deleteProject(element) {
let row = $(element).parent().parent();
let idProject = $(row).attr('data-idproject');