Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 0cc5e16

Browse files
committed
Fix broken buttons on download manager page
1 parent da0ca66 commit 0cc5e16

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

public/js/download-manager.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ const component = () => {
4343
this.loading = false;
4444
});
4545
},
46-
jobAction(action, id) {
46+
jobAction(action, event) {
4747
let url = `${base_url}api/admin/mangadex/queue/${action}`;
48-
if (id !== undefined)
49-
url += '?' + $.param({
48+
if (event) {
49+
const id = event.currentTarget.closest('tr').id.split('-')[1];
50+
url = `${url}?${$.param({
5051
id: id
51-
});
52+
})}`;
53+
}
5254
console.log(url);
5355
$.ajax({
5456
type: 'POST',

src/views/download-manager.html.ecr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
<td x-text="`${job.plugin_id || ''}`"></td>
5252

5353
<td>
54-
<a :onclick="`jobAction('delete', '${job.id}')`" uk-icon="trash"></a>
54+
<a @click="jobAction('delete', $event)" uk-icon="trash"></a>
5555
<template x-if="job.status_message.length > 0">
56-
<a :onclick="`jobAction('retry', '${job.id}')`" uk-icon="refresh"></a>
56+
<a @click="jobAction('retry', $event)" uk-icon="refresh"></a>
5757
</template>
5858
</td>
5959
</tr>

0 commit comments

Comments
 (0)