diff --git a/dashboard-ui/dlnasettings.html b/dashboard-ui/dlnasettings.html new file mode 100644 index 000000000..130e13e02 --- /dev/null +++ b/dashboard-ui/dlnasettings.html @@ -0,0 +1,44 @@ + + + + DLNA + + +
+ +
+
+ +
+ Settings +
+ +
+ +
    +
  • + + +
    Media Browser can detect devices within your network and offer the ability to remote control them.
    +
  • +
  • + + +
  • +
+ +
+ +
+
+ + +
+ + diff --git a/dashboard-ui/scripts/dlnasettings.js b/dashboard-ui/scripts/dlnasettings.js new file mode 100644 index 000000000..a9c9fa217 --- /dev/null +++ b/dashboard-ui/scripts/dlnasettings.js @@ -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); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 5967b5dbc..2e1a64618 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -729,6 +729,10 @@ var Dashboard = { name: "Auto-Organize", href: "autoorganizelog.html", selected: page.hasClass("organizePage") + }, { + name: "DLNA", + href: "dlnasettings.html", + selected: page.hasClass("dlnaPage") }, { name: "Live TV", href: "livetvstatus.html",