mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from dev
This commit is contained in:
parent
1c8f02ce0f
commit
33b01d778c
911 changed files with 34157 additions and 57125 deletions
|
@ -1,5 +1,4 @@
|
|||
|
||||
$.fn.taskButton = function (options) {
|
||||
$.fn.taskButton = function (options) {
|
||||
|
||||
function pollTasks(button) {
|
||||
|
||||
|
@ -7,7 +6,7 @@ $.fn.taskButton = function (options) {
|
|||
|
||||
IsEnabled: true
|
||||
|
||||
}).done(function (tasks) {
|
||||
}).then(function (tasks) {
|
||||
|
||||
updateTasks(button, tasks);
|
||||
});
|
||||
|
@ -34,7 +33,13 @@ $.fn.taskButton = function (options) {
|
|||
return;
|
||||
}
|
||||
|
||||
$(button).buttonEnabled(task.State == 'Idle').attr('data-taskid', task.Id);
|
||||
if (task.State == 'Idle') {
|
||||
$(button).removeAttr('disabled');
|
||||
} else {
|
||||
$(button).attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
$(button).attr('data-taskid', task.Id);
|
||||
|
||||
var progress = (task.CurrentProgressPercentage || 0).toFixed(1);
|
||||
|
||||
|
@ -66,7 +71,7 @@ $.fn.taskButton = function (options) {
|
|||
}
|
||||
|
||||
function onScheduledTaskMessageConfirmed(instance, id) {
|
||||
ApiClient.startScheduledTask(id).done(function () {
|
||||
ApiClient.startScheduledTask(id).then(function () {
|
||||
|
||||
pollTasks(instance);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue