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
cd5a8f06b3
commit
40fc62a233
15 changed files with 95 additions and 95 deletions
|
@ -24,12 +24,6 @@
|
|||
|
||||
Dashboard.getPluginSecurityInfo().done(function (pluginSecurityInfo) {
|
||||
|
||||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
$('#contribute', page).hide();
|
||||
} else {
|
||||
$('#contribute', page).show();
|
||||
}
|
||||
|
||||
DashboardPage.renderSupporterIcon(page, pluginSecurityInfo);
|
||||
});
|
||||
|
||||
|
@ -795,17 +789,15 @@
|
|||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
|
||||
imgUrl = "css/images/supporter/supporterbadge.png";
|
||||
text = "Thank you for supporting Media Browser.";
|
||||
text = Globalize.translate('MessageThankYouForSupporting');
|
||||
|
||||
$('.supporterIconContainer', page).html('<a class="imageLink supporterIcon" href="supporter.html" title="' + text + '"><img src="' + imgUrl + '" style="height:32px;vertical-align: middle; margin-right: .5em;" /></a><span style="position:relative;top:2px;text-decoration:none;">' + text + '</span>');
|
||||
$('.supporterIconContainer', page).hide();
|
||||
} else {
|
||||
|
||||
imgUrl = "css/images/supporter/nonsupporterbadge.png";
|
||||
text = "Please support Media Browser.";
|
||||
text = Globalize.translate('MessagePleaseSupportMediaBrowser');
|
||||
|
||||
$('.supporterIconContainer', page).html('<a class="imageLink supporterIcon" href="supporter.html" title="' + text + '"><img src="' + imgUrl + '" style="height:32px;vertical-align: middle; margin-right: .5em;" /><span style="position:relative;top:2px;text-decoration:none;">' + text + '</span></a>');
|
||||
$('.supporterIconContainer', page).hide();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
|
||||
ApiClient.getJSON(ApiClient.getUrl('Devices', {
|
||||
|
||||
SupportsUniqueIdentifier: true
|
||||
SupportsPersistentIdentifier: true
|
||||
|
||||
})).done(function (result) {
|
||||
|
||||
|
|
|
@ -492,10 +492,6 @@
|
|||
return "itemlist.html?parentId=" + item.Id;
|
||||
}
|
||||
|
||||
if (item.CollectionType == 'movies') {
|
||||
return 'movieslatest.html?topParentId=' + item.Id;
|
||||
}
|
||||
|
||||
if (item.CollectionType == 'tvshows') {
|
||||
return 'tvrecommended.html?topParentId=' + item.Id;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
self.isFlyout = true;
|
||||
|
||||
var startIndex = 0;
|
||||
var limit = 40;
|
||||
var limit = 5;
|
||||
var elem = $('.notificationsFlyoutlist');
|
||||
|
||||
refreshNotifications(startIndex, limit, elem, null, false).done(function() {
|
||||
|
@ -177,16 +177,18 @@
|
|||
|
||||
html += '<div class="notificationContent">';
|
||||
|
||||
html += '<p style="margin: .4em 0 .25em;" class="notificationName">' + notification.Name + '</p>';
|
||||
html += '<p style="font-size:16px;margin: .5em 0 .5em;" class="notificationName">';
|
||||
if (notification.Url) {
|
||||
html += '<a href="' + notification.Url + '" target="_blank" style="text-decoration:none;">' + notification.Name + '</a>';
|
||||
} else {
|
||||
html += notification.Name;
|
||||
}
|
||||
html += '</p>';
|
||||
|
||||
html += '<p class="notificationTime" style="margin: .25em 0;">' + humane_date(notification.Date) + '</p>';
|
||||
html += '<p class="notificationTime" style="margin: .5em 0;">' + humane_date(notification.Date) + '</p>';
|
||||
|
||||
if (notification.Description) {
|
||||
html += '<p style="margin: .25em 0;">' + notification.Description + '</p>';
|
||||
}
|
||||
|
||||
if (notification.Url) {
|
||||
html += '<p style="margin: .25em 0;"><a href="' + notification.Url + '" target="_blank">' + Globalize.translate('ButtonMoreInformation') + '</a></p>';
|
||||
html += '<p style="margin: .5em 0;max-height:100px;overflow:hidden;text-overflow:ellipsis;">' + notification.Description + '</p>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
|
|
@ -1318,7 +1318,7 @@ var Dashboard = {
|
|||
PlayableMediaTypes: "Audio,Video",
|
||||
|
||||
SupportedCommands: Dashboard.getSupportedRemoteCommands().join(','),
|
||||
SupportsUniqueIdentifier: false
|
||||
SupportsPersistentIdentifier: false
|
||||
};
|
||||
|
||||
window.ConnectionManager = new MediaBrowser.ConnectionManager(jQuery, Logger, credentialProvider, appName, appVersion, deviceName, deviceId, capabilities);
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
var html = '';
|
||||
|
||||
html += '<p>';
|
||||
html += '<label>' + Globalize.translate('LabelName') + '</label>';
|
||||
html += '<label for="txtJobName">' + Globalize.translate('LabelName') + '</label>';
|
||||
html += '<input id="txtJobName" type="text" required="required" />';
|
||||
html += '</p>';
|
||||
|
||||
html += '<p>';
|
||||
html += '<label>' + Globalize.translate('LabelSyncTo') + '</label>';
|
||||
html += '<label for="txtTargetName">' + Globalize.translate('LabelSyncTo') + '</label>';
|
||||
html += '<input id="txtTargetName" type="text" readonly="readonly" />';
|
||||
html += '</p>';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
html += '<fieldset data-role="controlgroup">';
|
||||
|
||||
html += '<legend>' + Globalize.translate('HeaderLibraryAccess') + '</legend>';
|
||||
html += '<legend>' + Globalize.translate('HeaderLibraries') + '</legend>';
|
||||
|
||||
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
||||
|
||||
|
@ -14,15 +14,17 @@
|
|||
|
||||
var id = 'mediaFolder' + i;
|
||||
|
||||
var checkedAttribute = user.Policy.BlockedMediaFolders.indexOf(folder.Id) == -1 && user.Policy.BlockedMediaFolders.indexOf(folder.Name) == -1 ? ' checked="checked"' : '';
|
||||
var checkedAttribute = user.Policy.EnableAllFolders || user.Policy.EnabledFolders.indexOf(folder.Id) != -1 ? ' checked="checked"' : '';
|
||||
|
||||
html += '<input class="chkMediaFolder" data-foldername="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<input class="chkFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
}
|
||||
|
||||
html += '</fieldset>';
|
||||
|
||||
$('.mediaFolderAccess', page).html(html).trigger('create');
|
||||
$('.folderAccess', page).html(html).trigger('create');
|
||||
|
||||
$('#chkEnableAllFolders', page).checked(user.Policy.EnableAllFolders).checkboxradio('refresh').trigger('change');
|
||||
}
|
||||
|
||||
function loadChannels(page, user, channels) {
|
||||
|
@ -110,11 +112,14 @@
|
|||
|
||||
function saveUser(user, page) {
|
||||
|
||||
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked();
|
||||
user.Policy.EnabledFolders = user.Policy.EnableAllFolders ?
|
||||
[] :
|
||||
$('.chkFolder:checked', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-foldername');
|
||||
return this.getAttribute('data-id');
|
||||
|
||||
}).get();
|
||||
}).get();
|
||||
|
||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
||||
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
|
||||
|
@ -182,6 +187,16 @@
|
|||
|
||||
});
|
||||
|
||||
$('#chkEnableAllFolders', page).on('change', function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('.folderAccessListContainer', page).hide();
|
||||
} else {
|
||||
$('.folderAccessListContainer', page).show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}).on('pageshow', "#userLibraryAccessPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
@ -210,7 +225,7 @@
|
|||
var promise4 = ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", { IsHidden: false }));
|
||||
var promise5 = ApiClient.getJSON(ApiClient.getUrl("Channels"));
|
||||
var promise6 = ApiClient.getJSON(ApiClient.getUrl('Devices', {
|
||||
SupportsUniqueIdentifier: true
|
||||
SupportsPersistentIdentifier: true
|
||||
}));
|
||||
|
||||
$.when(promise1, promise2, promise4, promise5, promise6).done(function (response1, response2, response4, response5, response6) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
html += '<fieldset data-role="controlgroup">';
|
||||
|
||||
html += '<legend>' + Globalize.translate('HeaderMediaFolders') + '</legend>';
|
||||
html += '<legend>' + Globalize.translate('HeaderLibraries') + '</legend>';
|
||||
|
||||
for (var i = 0, length = mediaFolders.length; i < length; i++) {
|
||||
|
||||
|
@ -16,13 +16,15 @@
|
|||
|
||||
var checkedAttribute = ' checked="checked"';
|
||||
|
||||
html += '<input class="chkMediaFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<input class="chkFolder" data-id="' + folder.Id + '" type="checkbox" id="' + id + '"' + checkedAttribute + ' />';
|
||||
html += '<label for="' + id + '">' + folder.Name + '</label>';
|
||||
}
|
||||
|
||||
html += '</fieldset>';
|
||||
|
||||
$('.mediaFolderAccess', page).html(html).trigger('create');
|
||||
$('.folderAccess', page).html(html).trigger('create');
|
||||
|
||||
$('#chkEnableAllFolders', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||
}
|
||||
|
||||
function loadChannels(page, channels) {
|
||||
|
@ -83,11 +85,14 @@
|
|||
|
||||
ApiClient.createUser(name).done(function (user) {
|
||||
|
||||
user.Policy.BlockedMediaFolders = $('.chkMediaFolder:not(:checked)', page).map(function () {
|
||||
user.Policy.EnableAllFolders = $('#chkEnableAllFolders', page).checked();
|
||||
user.Policy.EnabledFolders = user.Policy.EnableAllFolders ?
|
||||
[] :
|
||||
$('.chkFolder:checked', page).map(function () {
|
||||
|
||||
return this.getAttribute('data-id');
|
||||
return this.getAttribute('data-id');
|
||||
|
||||
}).get();
|
||||
}).get();
|
||||
|
||||
user.Policy.EnableAllChannels = $('#chkEnableAllChannels', page).checked();
|
||||
user.Policy.EnabledChannels = user.Policy.EnableAllChannels ?
|
||||
|
@ -142,6 +147,16 @@
|
|||
|
||||
});
|
||||
|
||||
$('#chkEnableAllFolders', page).on('change', function () {
|
||||
|
||||
if (this.checked) {
|
||||
$('.folderAccessListContainer', page).hide();
|
||||
} else {
|
||||
$('.folderAccessListContainer', page).show();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}).on('pageshow', "#newUserPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
|
||||
ApiClient.getJSON(ApiClient.getUrl("Channels", {})).done(function (channelsResult) {
|
||||
|
||||
var shareExcludes = $(".chkShareFolder:not(:checked)", page).get().map(function (i) {
|
||||
var shareExcludes = $(".chkShareFolder:checked", page).get().map(function (i) {
|
||||
|
||||
return i.getAttribute('data-folderid');
|
||||
});
|
||||
|
@ -355,7 +355,7 @@
|
|||
data: {
|
||||
|
||||
ConnectUsername: $('#txtConnectUsername', page).val(),
|
||||
ExcludedLibraries: shareExcludes.join(','),
|
||||
EnabledLibraries: shareExcludes.join(','),
|
||||
SendingUserId: Dashboard.getCurrentUserId(),
|
||||
EnableLiveTv: false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue