mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add options for media in archives
This commit is contained in:
parent
b1d9616deb
commit
21a688d6c6
7 changed files with 252 additions and 116 deletions
|
@ -6,7 +6,7 @@
|
|||
text-decoration: none !important;
|
||||
vertical-align: middle;
|
||||
border-radius: 1000px;
|
||||
padding: 4px 10px 4px;
|
||||
padding: 5px 10px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
-moz-user-select: none;
|
||||
|
|
|
@ -27,11 +27,45 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<div data-role="collapsible">
|
||||
<h2>${HeaderAudio}</h2>
|
||||
<div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="chkEnableAudioArchiveFiles">${OptionDetectArchiveFilesAsMedia}</label>
|
||||
<input type="checkbox" id="chkEnableAudioArchiveFiles" />
|
||||
<div class="fieldDescription">${OptionDetectArchiveFilesAsMediaHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible">
|
||||
<h2>${HeaderVideo}</h2>
|
||||
<div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="chkEnableVideoArchiveFiles">${OptionDetectArchiveFilesAsMedia}</label>
|
||||
<input type="checkbox" id="chkEnableVideoArchiveFiles" />
|
||||
<div class="fieldDescription">${OptionDetectArchiveFilesAsMediaHelp}</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div data-role="collapsible">
|
||||
<h2>${HeaderTV}</h2>
|
||||
<div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="txtSeasonZeroName">${LabelSeasonZeroDisplayName}</label>
|
||||
<input type="text" id="txtSeasonZeroName" name="txtSeasonZeroName" required="required" />
|
||||
</li>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<input type="checkbox" id="chkEnableRealtimeMonitor" name="chkEnableRealtimeMonitor" />
|
||||
<label for="chkEnableRealtimeMonitor">${LabelEnableRealtimeMonitor}</label>
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
<a href="channelsettings.html" data-role="button">${TabChannels}</a>
|
||||
</div>
|
||||
|
||||
<div class="readOnlyContent">
|
||||
<ul id="ulInstalledPlugins" data-role="listview" data-inset="true" data-auto-enhanced="false" data-split-icon="minus"></ul>
|
||||
</div>
|
||||
<div class="installedPlugins"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
$('#txtItemsByNamePath', page).val(config.ItemsByNamePath || '');
|
||||
|
||||
$('#chkEnableAudioArchiveFiles', page).checked(config.EnableAudioArchiveFiles).checkboxradio("refresh");
|
||||
$('#chkEnableVideoArchiveFiles', page).checked(config.EnableVideoArchiveFiles).checkboxradio("refresh");
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
|
@ -65,6 +68,9 @@
|
|||
|
||||
config.EnableRealtimeMonitor = $('#chkEnableRealtimeMonitor', form).checked();
|
||||
|
||||
config.EnableAudioArchiveFiles = $('#chkEnableAudioArchiveFiles', form).checked();
|
||||
config.EnableVideoArchiveFiles = $('#chkEnableVideoArchiveFiles', form).checked();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
|
|
|
@ -1,99 +1,6 @@
|
|||
var PluginsPage = {
|
||||
(function ($, window) {
|
||||
|
||||
onPageShow: function () {
|
||||
PluginsPage.reloadList(this);
|
||||
},
|
||||
|
||||
reloadList: function (page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var promise1 = ApiClient.getInstalledPlugins();
|
||||
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration");
|
||||
|
||||
$.when(promise1, promise2).done(function (response1, response2) {
|
||||
|
||||
PluginsPage.populateList(page, response1[0], response2[0]);
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
showNoConfigurationMessage: function() {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('NoPluginConfigurationMessage')
|
||||
});
|
||||
},
|
||||
|
||||
showConnectMessage: function () {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('MessagePluginConfigurationRequiresLocalAccess')
|
||||
});
|
||||
},
|
||||
|
||||
populateList: function (page, plugins, pluginConfigurationPages) {
|
||||
|
||||
plugins = plugins.sort(function (plugin1, plugin2) {
|
||||
|
||||
return (plugin1.Name) > (plugin2.Name) ? 1 : -1;
|
||||
|
||||
});
|
||||
|
||||
var html = "";
|
||||
|
||||
for (var i = 0, length = plugins.length; i < length; i++) {
|
||||
|
||||
var plugin = plugins[i];
|
||||
|
||||
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||
})[0];
|
||||
|
||||
html += "<li>";
|
||||
|
||||
if (Dashboard.isConnectMode()) {
|
||||
html += "<a onclick='PluginsPage.showConnectMessage();' href='#'>";
|
||||
}
|
||||
else if (configPage) {
|
||||
html += "<a href='" + Dashboard.getConfigurationPageUrl(configPage.Name) + "'>";
|
||||
}
|
||||
else {
|
||||
html += "<a onclick='PluginsPage.showNoConfigurationMessage();' href='#'>";
|
||||
}
|
||||
|
||||
html += "<h3>" + plugin.Name + "</h3>";
|
||||
|
||||
html += "<p>" + plugin.Version + "</p>";
|
||||
|
||||
html += "</a>";
|
||||
|
||||
html += "<a data-id='" + plugin.Id + "' data-pluginname='" + plugin.Name + "' onclick='PluginsPage.deletePlugin(this);' href='#'>" + Globalize.translate('Delete') + "</a>";
|
||||
|
||||
html += "</li>";
|
||||
}
|
||||
|
||||
if (!plugins.length) {
|
||||
|
||||
html += '<li style="padding:5px;">';
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
|
||||
html += '<p><a href="plugincatalog.html">';
|
||||
html += Globalize.translate('BrowsePluginCatalogMessage');
|
||||
html += '</a></p>';
|
||||
html += '</li>';
|
||||
|
||||
$('#ulInstalledPlugins', page).html(html);
|
||||
} else {
|
||||
$('#ulInstalledPlugins', page).html(html).listview('refresh');
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
||||
deletePlugin: function (link) {
|
||||
|
||||
var page = $(link).parents('.page');
|
||||
var name = link.getAttribute('data-pluginname');
|
||||
var uniqueid = link.getAttribute('data-id');
|
||||
function deletePlugin(page, uniqueid, name) {
|
||||
|
||||
var msg = Globalize.translate('UninstallPluginConfirmation').replace("{0}", name);
|
||||
|
||||
|
@ -104,12 +11,197 @@
|
|||
|
||||
ApiClient.uninstallPlugin(uniqueid).done(function () {
|
||||
|
||||
PluginsPage.reloadList(page);
|
||||
reloadList(page);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$(document).on('pageshow', "#pluginsPage", PluginsPage.onPageShow);
|
||||
function showNoConfigurationMessage() {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('NoPluginConfigurationMessage')
|
||||
});
|
||||
}
|
||||
|
||||
function showConnectMessage() {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('MessagePluginConfigurationRequiresLocalAccess')
|
||||
});
|
||||
}
|
||||
|
||||
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
||||
|
||||
var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||
})[0];
|
||||
|
||||
var html = '';
|
||||
|
||||
var href = configPage && !Dashboard.isConnectMode() ?
|
||||
Dashboard.getConfigurationPageUrl(configPage.Name) :
|
||||
null;
|
||||
|
||||
html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' class='card backdropCard alternateHover bottomPaddedCard'>";
|
||||
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
||||
html += '<div class="cardPadder"></div>';
|
||||
|
||||
if (href) {
|
||||
html += '<a class="cardContent" href="' + href + '">';
|
||||
} else {
|
||||
html += '<div class="cardContent">';
|
||||
}
|
||||
|
||||
if (plugin.ImageUrl) {
|
||||
html += '<div class="cardImage" style="background-image:url(\'' + plugin.ImageUrl + '\');">';
|
||||
} else {
|
||||
html += '<div class="cardImage" style="background-image:url(\'css/images/items/list/collection.png\');">';
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
// cardContent
|
||||
if (href) {
|
||||
html += "</a>";
|
||||
} else {
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
// cardScalable
|
||||
html += "</div>";
|
||||
|
||||
html += '<div class="cardFooter">';
|
||||
|
||||
html += '<div class="cardText" style="text-align:right; float:right;">';
|
||||
html += '<button class="btnCardMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 2px 0 0;"></button>';
|
||||
html += "</div>";
|
||||
|
||||
html += "<div class='cardText'>";
|
||||
html += plugin.Name;
|
||||
html += "</div>";
|
||||
|
||||
html += "<div class='cardText'>";
|
||||
html += plugin.Version;
|
||||
html += "</div>";
|
||||
|
||||
// cardFooter
|
||||
html += "</div>";
|
||||
|
||||
// cardBox
|
||||
html += "</div>";
|
||||
|
||||
// card
|
||||
html += "</div>";
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function populateList(page, plugins, pluginConfigurationPages) {
|
||||
|
||||
plugins = plugins.sort(function (plugin1, plugin2) {
|
||||
|
||||
return (plugin1.Name) > (plugin2.Name) ? 1 : -1;
|
||||
|
||||
});
|
||||
|
||||
var html = plugins.map(function (p) {
|
||||
return getPluginCardHtml(p, pluginConfigurationPages);
|
||||
|
||||
}).join('');
|
||||
|
||||
if (!plugins.length) {
|
||||
|
||||
html += '<div style="padding:5px;">';
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
|
||||
html += '<p><a href="plugincatalog.html">';
|
||||
html += Globalize.translate('BrowsePluginCatalogMessage');
|
||||
html += '</a></p>';
|
||||
html += '</div>';
|
||||
|
||||
$('.installedPlugins', page).html(html).trigger('create');
|
||||
} else {
|
||||
|
||||
var elem = $('.installedPlugins', page).html(html).trigger('create');
|
||||
|
||||
$('.btnNoConfig', elem).on('click', function () {
|
||||
showNoConfigurationMessage();
|
||||
});
|
||||
|
||||
$('.btnConnectPlugin', elem).on('click', function () {
|
||||
showConnectMessage();
|
||||
});
|
||||
|
||||
$('.btnCardMenu', elem).on('click', function () {
|
||||
showPluginMenu(page, this);
|
||||
});
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function showPluginMenu(page, elem) {
|
||||
|
||||
var card = $(elem).parents('.card');
|
||||
var id = card.attr('data-id');
|
||||
var name = card.attr('data-name');
|
||||
var configHref = $('.cardContent', card).attr('href');
|
||||
|
||||
$('.cardMenu', page).popup("close").remove();
|
||||
|
||||
var html = '<div data-role="popup" class="cardMenu tapHoldMenu" data-theme="a">';
|
||||
|
||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
||||
|
||||
if (configHref) {
|
||||
html += '<li><a href="' + configHref + '">' + Globalize.translate('ButtonSettings') + '</a></li>';
|
||||
}
|
||||
|
||||
html += '<li><a href="#" class="btnDeletePlugin">' + Globalize.translate('ButtonUninstall') + '</a></li>';
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$(page).append(html);
|
||||
|
||||
var flyout = $('.cardMenu', page).popup({ positionTo: elem || "window" }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
|
||||
});
|
||||
|
||||
$('.btnDeletePlugin', flyout).on('click', function () {
|
||||
|
||||
$('.cardMenu', page).popup('close');
|
||||
|
||||
// jqm won't show a popup while another is in the act of closing
|
||||
setTimeout(function () {
|
||||
deletePlugin(page, id, name);
|
||||
}, 300);
|
||||
});
|
||||
}
|
||||
|
||||
function reloadList(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var promise1 = ApiClient.getInstalledPlugins();
|
||||
|
||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration");
|
||||
|
||||
$.when(promise1, promise2).done(function (response1, response2) {
|
||||
|
||||
populateList(page, response1[0], response2[0]);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#pluginsPage", function () {
|
||||
|
||||
reloadList(this);
|
||||
});
|
||||
|
||||
})(jQuery, window);
|
|
@ -21,19 +21,19 @@
|
|||
$('#txtUserName', page).val(user.Name);
|
||||
$('#txtConnectUserName', page).val(currentUser.ConnectUserName);
|
||||
|
||||
$('#chkIsAdmin', page).checked(user.Policy.IsAdministrator || false).checkboxradio("refresh");
|
||||
$('#chkIsAdmin', page).checked(user.Policy.IsAdministrator).checkboxradio("refresh");
|
||||
|
||||
$('#chkDisabled', page).checked(user.Policy.IsDisabled || false).checkboxradio("refresh");
|
||||
$('#chkIsHidden', page).checked(user.Policy.IsHidden || false).checkboxradio("refresh");
|
||||
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl);
|
||||
$('#chkDisabled', page).checked(user.Policy.IsDisabled).checkboxradio("refresh");
|
||||
$('#chkIsHidden', page).checked(user.Policy.IsHidden).checkboxradio("refresh");
|
||||
$('#chkRemoteControlSharedDevices', page).checked(user.Policy.EnableSharedDeviceControl).checkboxradio("refresh");
|
||||
$('#chkEnableRemoteControlOtherUsers', page).checked(user.Policy.EnableRemoteControlOfOtherUsers).checkboxradio("refresh");
|
||||
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback || false).checkboxradio("refresh");
|
||||
$('#chkEnableMediaPlayback', page).checked(user.Policy.EnableMediaPlayback).checkboxradio("refresh");
|
||||
|
||||
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement || false).checkboxradio("refresh");
|
||||
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess || false).checkboxradio("refresh");
|
||||
$('#chkEnableContentDeletion', page).checked(user.Policy.EnableContentDeletion || false).checkboxradio("refresh");
|
||||
$('#chkManageLiveTv', page).checked(user.Policy.EnableLiveTvManagement).checkboxradio("refresh");
|
||||
$('#chkEnableLiveTvAccess', page).checked(user.Policy.EnableLiveTvAccess).checkboxradio("refresh");
|
||||
$('#chkEnableContentDeletion', page).checked(user.Policy.EnableContentDeletion).checkboxradio("refresh");
|
||||
|
||||
$('#chkDisableUserPreferences', page).checked((!user.Policy.EnableUserPreferenceAccess) || false).checkboxradio("refresh");
|
||||
$('#chkDisableUserPreferences', page).checked((!user.Policy.EnableUserPreferenceAccess)).checkboxradio("refresh");
|
||||
|
||||
$('#chkEnableSync', page).checked(user.Policy.EnableSync).checkboxradio("refresh");
|
||||
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
if ($('#chkAccept', page).checked()) {
|
||||
Dashboard.navigate('wizardfinish.html');
|
||||
} else {
|
||||
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate('MessagePleaseAcceptTermsOfServiceBeforeContinuing'),
|
||||
title: ''
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue