1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

added play to config page

This commit is contained in:
Luke Pulverenti 2014-03-10 13:38:53 -04:00
parent bc2682eaf8
commit 07308ea9a7
3 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>DLNA</title>
</head>
<body>
<div id="dlnaSettingsPage" data-role="page" class="page type-interior adminPage dlnaPage">
<div data-role="content">
<div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">Settings</a>
</div>
<form class="dlnaSettingsForm">
<ul data-role="listview" class="ulForm">
<li>
<label for="chkEnablePlayTo">Enable DLNA Play To</label>
<input type="checkbox" id="chkEnablePlayTo" data-mini="true" />
<div class="fieldDescription">Media Browser can detect devices within your network and offer the ability to remote control them.</div>
</li>
<li>
<button type="submit" data-theme="b" data-icon="check">
Save
</button>
<button type="button" onclick="Dashboard.navigate('dashboard.html');" data-icon="delete">
Cancel
</button>
</li>
</ul>
</form>
</div>
</div>
<script type="text/javascript">
$('.dlnaSettingsForm').off('submit', DlnaSettingsPage.onSubmit).on('submit', DlnaSettingsPage.onSubmit);
</script>
</div>
</body>
</html>

View file

@ -0,0 +1,45 @@
(function ($, document, window) {
function loadPage(page, config) {
$('#chkEnablePlayTo', page).checked(config.DlnaOptions.EnablePlayTo).checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
$(document).on('pageshow', "#dlnaSettingsPage", function () {
Dashboard.showLoadingMsg();
var page = this;
ApiClient.getServerConfiguration().done(function (config) {
loadPage(page, config);
});
});
function onSubmit() {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getServerConfiguration().done(function (config) {
config.DlnaOptions.EnablePlayTo = $('#chkEnablePlayTo', form).checked();
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
});
// Disable default form submission
return false;
}
window.DlnaSettingsPage = {
onSubmit: onSubmit
};
})(jQuery, document, window);

View file

@ -729,6 +729,10 @@ var Dashboard = {
name: "Auto-Organize", name: "Auto-Organize",
href: "autoorganizelog.html", href: "autoorganizelog.html",
selected: page.hasClass("organizePage") selected: page.hasClass("organizePage")
}, {
name: "DLNA",
href: "dlnasettings.html",
selected: page.hasClass("dlnaPage")
}, { }, {
name: "Live TV", name: "Live TV",
href: "livetvstatus.html", href: "livetvstatus.html",