Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tasktracker-bootstrap",
"version": "1.0.4",
"version": "1.0.5",
"description": "Task tracker site bootstrap5 templates",
"private": true,
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion src/scss/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $list-img-max-size: 5rem;
}
}

// action buttons
[hx-patch] {
color: var(--bs-success);
}
Expand Down
11 changes: 5 additions & 6 deletions src/views/partials/list_task.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
<div class="d-flex flex-row justify-content-between align-items-center">
{{#if completed}}
<i class="bi bi-arrow-repeat{{#unless can_edit}} disabled{{/unless}}" role="button"
hx-patch="/api/v1/tasks/{{pk}}" hx-vals="js:{completed:false}" hx-swap="none"
data-task-target="{{pk}}" data-task-action="patch"></i>
hx-patch="/api/v1/tasks/{{pk}}" hx-swap="none"
hx-vals="js:{completed:false}" hx-headers="js:{}"></i>
{{else}}
<i class="bi bi-check-lg{{#unless can_edit}} disabled{{/unless}}" role="button"
hx-patch="/api/v1/tasks/{{pk}}" hx-vals="js:{completed:true}" hx-swap="none"
data-task-target="{{pk}}" data-task-action="patch"></i>
hx-patch="/api/v1/tasks/{{pk}}" hx-swap="none"
hx-vals="js:{completed:true}" hx-headers="js:{}"></i>
{{/if}}
<i class="bi bi-trash{{#unless can_edit}} disabled{{/unless}}" role="button"
hx-delete="/api/v1/tasks/{{pk}}" hx-target="closest tr" hx-swap="outerHTML"
data-task-target="{{pk}}" data-task-action="delete"></i>
hx-delete="/api/v1/tasks/{{pk}}" hx-target="closest tr" hx-swap="outerHTML"></i>
</div>
</td>
</tr>