double-click on issues in list view opens edit window
This commit is contained in:
@@ -50,15 +50,7 @@ templ DashboardContent(props DashboardProps) {
|
||||
>
|
||||
New Issue
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-error btn-sm btn-outline"
|
||||
hx-delete={ "/issues/" + props.SelectedIssue.ID }
|
||||
hx-confirm="Are you sure you want to delete this issue? This action cannot be undone."
|
||||
hx-target="body"
|
||||
>
|
||||
Delete issue
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
if props.SelectedIssue != nil {
|
||||
@@ -136,6 +128,8 @@ templ DashboardIssueRows(issues []*models.Issue, selectedID string) {
|
||||
hx-target="main"
|
||||
hx-vals={ `{"selected-issue": "` + issue.ID + `"}` }
|
||||
hx-swap="innerHTML"
|
||||
data-issue-id={ issue.ID }
|
||||
ondblclick="event.preventDefault(); var id = this.dataset.issueId; if(id) htmx.ajax('GET', '/issues/' + id + '/edit', {target: '#modal-container', swap: 'innerHTML'})"
|
||||
>
|
||||
<td class="min-w-20 truncate">{ issue.ID }</td>
|
||||
<td class="truncate max-w-60">{ issue.Title }</td>
|
||||
|
||||
Reference in New Issue
Block a user