mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
sync updates
This commit is contained in:
parent
e82017b591
commit
0022427719
3 changed files with 54 additions and 8 deletions
|
@ -66,8 +66,7 @@
|
||||||
|
|
||||||
html += '<li class="' + cssClass + '"' + ' data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '">';
|
html += '<li class="' + cssClass + '"' + ' data-itemid="' + jobItem.Id + '" data-status="' + jobItem.Status + '">';
|
||||||
|
|
||||||
var hasActions = jobItem.Status != 'RemovedFromDevice';
|
var hasActions = ['Queued', 'Cancelled', 'Failed', 'Transferring', 'Converting'].indexOf(jobItem.Status) != -1;
|
||||||
hasActions = false;
|
|
||||||
|
|
||||||
html += '<a href="#">';
|
html += '<a href="#">';
|
||||||
|
|
||||||
|
@ -156,8 +155,14 @@
|
||||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||||
|
|
||||||
if (status != 'Cancelled' && status != 'RemovedFromDevice' && status != 'Failed') {
|
if (status == 'Failed') {
|
||||||
html += '<li data-icon="delete"><a href="#" class="btnCancelJob" data-id="' + id + '">' + Globalize.translate('ButtonCancel') + '</a></li>';
|
html += '<li data-icon="check"><a href="#" class="btnRetryJobItem" data-id="' + id + '">' + Globalize.translate('ButtonQueueForRetry') + '</a></li>';
|
||||||
|
}
|
||||||
|
else if (status == 'Cancelled') {
|
||||||
|
html += '<li data-icon="check"><a href="#" class="btnRetryJobItem" data-id="' + id + '">' + Globalize.translate('ButtonReenable') + '</a></li>';
|
||||||
|
}
|
||||||
|
else if (status == 'Queued' || status == 'Transferring' || status == 'Converting') {
|
||||||
|
html += '<li data-icon="delete"><a href="#" class="btnCancelJobItem" data-id="' + id + '">' + Globalize.translate('ButtonCancelItem') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</ul>';
|
html += '</ul>';
|
||||||
|
@ -172,8 +177,47 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnCancelJob', flyout).on('click', function () {
|
$('.btnCancelJobItem', flyout).on('click', function () {
|
||||||
//cancelJob(page, this.getAttribute('data-id'));
|
cancelJobItem(page, this.getAttribute('data-id'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.btnRetryJobItem', flyout).on('click', function () {
|
||||||
|
retryJobItem(page, this.getAttribute('data-id'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function cancelJobItem(page, jobItemId) {
|
||||||
|
|
||||||
|
$('.jobMenu', page).popup('close');
|
||||||
|
|
||||||
|
// Need a timeout because jquery mobile will not show a popup while another is in the act of closing
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.ajax({
|
||||||
|
|
||||||
|
type: "DELETE",
|
||||||
|
url: ApiClient.getUrl('Sync/JobItems/' + jobItemId)
|
||||||
|
|
||||||
|
}).done(function () {
|
||||||
|
|
||||||
|
loadJob(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function retryJobItem(page, jobItemId) {
|
||||||
|
|
||||||
|
$('.jobMenu', page).popup('close');
|
||||||
|
|
||||||
|
ApiClient.ajax({
|
||||||
|
|
||||||
|
type: "POST",
|
||||||
|
url: ApiClient.getUrl('Sync/JobItems/' + jobItemId + '/Enable')
|
||||||
|
|
||||||
|
}).done(function () {
|
||||||
|
|
||||||
|
loadJob(page);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@
|
||||||
return this.getAttribute('data-id');
|
return this.getAttribute('data-id');
|
||||||
|
|
||||||
}).get();
|
}).get();
|
||||||
|
user.Policy.BlockedMediaFolders = null;
|
||||||
|
|
||||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
||||||
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
|
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
|
||||||
|
@ -129,6 +130,7 @@
|
||||||
return this.getAttribute('data-id');
|
return this.getAttribute('data-id');
|
||||||
|
|
||||||
}).get();
|
}).get();
|
||||||
|
user.Policy.BlockedChannels = null;
|
||||||
|
|
||||||
user.Policy.EnableAllDevices = $('#chkEnableAllDevices', page).checked();
|
user.Policy.EnableAllDevices = $('#chkEnableAllDevices', page).checked();
|
||||||
user.Policy.EnabledDevices = user.Policy.EnableAllDevices ?
|
user.Policy.EnabledDevices = user.Policy.EnableAllDevices ?
|
||||||
|
|
|
@ -1491,9 +1491,9 @@
|
||||||
/**
|
/**
|
||||||
* Gets the virtual folder list
|
* Gets the virtual folder list
|
||||||
*/
|
*/
|
||||||
self.getVirtualFolders = function (userId) {
|
self.getVirtualFolders = function () {
|
||||||
|
|
||||||
var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders";
|
var url = "Library/VirtualFolders";
|
||||||
|
|
||||||
url = self.getUrl(url);
|
url = self.getUrl(url);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue