mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support deleting and canceling live tv recordings and timers
This commit is contained in:
parent
8dd607af86
commit
ac0cc84f9d
14 changed files with 181 additions and 75 deletions
|
@ -1,5 +1,28 @@
|
|||
(function ($, document, apiClient) {
|
||||
|
||||
function editTimer(page, id) {
|
||||
|
||||
}
|
||||
|
||||
function deleteTimer(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to delete this timer?", "Confirm Timer Deletion", function (result) {
|
||||
|
||||
if (result) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.cancelLiveTvTimer(id).done(function () {
|
||||
|
||||
Dashboard.alert('Timer deleted');
|
||||
|
||||
reload(page);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function renderTimers(page, timers) {
|
||||
|
||||
var html = '';
|
||||
|
@ -61,6 +84,20 @@
|
|||
html += '</table></div>';
|
||||
|
||||
var elem = $('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.btnEditTimer', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-timerid');
|
||||
|
||||
editTimer(page, id);
|
||||
});
|
||||
|
||||
$('.btnDeleteTimer', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-timerid');
|
||||
|
||||
deleteTimer(page, id);
|
||||
});
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue