diff --git a/dashboard-ui/addplugin.html b/dashboard-ui/addplugin.html index 90f3d681a4..dc584e2f92 100644 --- a/dashboard-ui/addplugin.html +++ b/dashboard-ui/addplugin.html @@ -19,9 +19,10 @@ ${TabSettings} diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json index cb6e0e6c44..031b285464 100644 --- a/dashboard-ui/bower_components/polymer/.bower.json +++ b/dashboard-ui/bower_components/polymer/.bower.json @@ -23,14 +23,14 @@ "web-component-tester": "*" }, "private": true, - "homepage": "https://github.com/polymer/polymer", + "homepage": "https://github.com/Polymer/polymer", "_release": "1.0.7", "_resolution": { "type": "version", "tag": "v1.0.7", "commit": "b39d0015ce5428232409eb3aca7ddefea899f894" }, - "_source": "git://github.com/polymer/polymer.git", + "_source": "git://github.com/Polymer/polymer.git", "_target": "^1.0.0", - "_originalSource": "polymer/polymer" + "_originalSource": "Polymer/polymer" } \ No newline at end of file diff --git a/dashboard-ui/cordova/actionsheet.js b/dashboard-ui/cordova/actionsheet.js index 720c933581..981f9ca2b3 100644 --- a/dashboard-ui/cordova/actionsheet.js +++ b/dashboard-ui/cordova/actionsheet.js @@ -7,6 +7,33 @@ // showCancel // title + // If any items have an icon, give them all an icon just to make sure they're all lined up evenly + var renderIcon = options.items.filter(function (o) { + return o.ironIcon; + }).length; + + if (renderIcon) { + + // iOS supports unicode icons + if ($.browser.safari) { + + for (var i = 0, length = options.items.length; i < length; i++) { + + var option = options.items[i]; + + switch (option.ironIcon) { + + case 'check': + option.name = '\\u2713 ' + option.name; + break; + default: + option.name = '\\u2001 ' + option.name; + break; + } + } + } + } + var innerOptions = { 'title': options.title, 'buttonLabels': options.items.map(function (i) { @@ -27,7 +54,7 @@ // Results are 1-based if (index >= 1 && options.items.length >= index) { - + options.callback(options.items[index - 1].id); } } diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 75df02a5b8..56c67900f8 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -153,7 +153,7 @@ @media all and (min-width: 1920px) { .ehsContent { - width: 97%; + width: 96%; } } diff --git a/dashboard-ui/livetvsettings.html b/dashboard-ui/livetvsettings.html index f02d9eb674..332c0fd01a 100644 --- a/dashboard-ui/livetvsettings.html +++ b/dashboard-ui/livetvsettings.html @@ -10,9 +10,10 @@
- ${TabStatus} - ${TabServices} + ${TabTuners} + ${TabGuide} ${TabSettings} + ${TabExternalServices}
diff --git a/dashboard-ui/scripts/appservices.js b/dashboard-ui/scripts/appservices.js index a019adf85b..f70103b718 100644 --- a/dashboard-ui/scripts/appservices.js +++ b/dashboard-ui/scripts/appservices.js @@ -81,7 +81,6 @@ var context = getParameterByName('context'); $('.sectionTabs', page).hide(); - $('.' + context + 'SectionTabs', page).show(); if (context == 'sync') { Dashboard.setPageTitle(Globalize.translate('TitleSync')); @@ -96,6 +95,17 @@ page.setAttribute('data-helpurl', 'https://github.com/MediaBrowser/Wiki/wiki/Notifications'); } + }).on('pagebeforeshowready', "#appServicesPage", function () { + + // This needs both events for the helpurl to get done at the right time + + var page = this; + + var context = getParameterByName('context'); + + $('.sectionTabs', page).hide(); + $('.' + context + 'SectionTabs', page).show(); + }).on('pageshowready', "#appServicesPage", function () { // This needs both events for the helpurl to get done at the right time diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js index 4b4de3fedc..52309d0189 100644 --- a/dashboard-ui/scripts/livetvstatus.js +++ b/dashboard-ui/scripts/livetvstatus.js @@ -150,7 +150,19 @@ $('.noLiveTvServices', page).show(); } - $('.servicesList', page).html(liveTvInfo.Services.map(getServiceHtml).join('')).trigger('create'); + var servicesToDisplay = liveTvInfo.Services.filter(function (s) { + + return s.IsVisible; + + }); + + if (servicesToDisplay.length) { + $('.servicesSection', page).show(); + } else { + $('.servicesSection', page).hide(); + } + + $('.servicesList', page).html(servicesToDisplay.map(getServiceHtml).join('')).trigger('create'); var tuners = []; for (var i = 0, length = liveTvInfo.Services.length; i < length; i++) { @@ -162,9 +174,83 @@ renderTuners(page, tuners); + ApiClient.getNamedConfiguration("livetv").done(function (config) { + + renderDevices(page, config.TunerHosts); + }); + Dashboard.hideLoadingMsg(); } + function renderDevices(page, devices) { + + var html = ''; + + html += ''; + + var elem = $('.devicesList', page).html(html).trigger('create'); + + $('.btnDeleteDevice', elem).on('click', function () { + + var id = this.getAttribute('data-id'); + + deleteDevice(page, id); + }); + } + + function deleteDevice(page, id) { + + var message = Globalize.translate('MessageConfirmDeleteTunerDevice'); + + Dashboard.confirm(message, Globalize.translate('HeaderDeleteDevice'), function (confirmResult) { + + if (confirmResult) { + + Dashboard.showLoadingMsg(); + + ApiClient.ajax({ + type: "DELETE", + url: ApiClient.getUrl('LiveTv/TunerHosts', { + Id: id + }) + + }).done(function () { + + reload(page); + }); + } + }); + } + function reload(page) { Dashboard.showLoadingMsg(); @@ -176,29 +262,45 @@ }); } - $(document).on('pageshowready', "#liveTvStatusPage", function () { + function submitAddDeviceForm(page) { + + page.querySelector('.dlgAddDevice').close(); + Dashboard.showLoadingMsg(); + + ApiClient.ajax({ + type: "POST", + url: ApiClient.getUrl('LiveTv/TunerHosts'), + data: JSON.stringify({ + Type: $('#selectTunerDeviceType', page).val(), + Url: $('#txtDevicePath', page).val() + }), + contentType: "application/json" + + }).done(function () { + + reload(page); + }); + + } + + $(document).on('pageinitdepends', "#liveTvStatusPage", function () { + + var page = this; + + $('.btnAddDevice', page).on('click', function () { + page.querySelector('.dlgAddDevice').open(); + }); + + $('.dlgAddDevice', page).on('submit', function () { + submitAddDeviceForm(page); + return false; + }); + + }).on('pageshowready', "#liveTvStatusPage", function () { var page = this; reload(page); - - // on here - $('.btnRefreshGuide', page).taskButton({ - mode: 'on', - progressElem: $('.refreshGuideProgress', page), - lastResultElem: $('.lastRefreshGuideResult', page), - taskKey: 'RefreshGuide' - }); - - }).on('pagebeforehide', "#liveTvStatusPage", function () { - - var page = this; - - // off here - $('.btnRefreshGuide', page).taskButton({ - mode: 'off' - }); - }); })(jQuery, document, window); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index fc12fab329..eeec93b330 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -58,6 +58,7 @@ options.push({ name: '1080p - 8Mbps', maxHeight: 1080, bitrate: 8000001 }); options.push({ name: '1080p - 6Mbps', maxHeight: 1080, bitrate: 6000001 }); options.push({ name: '1080p - 5Mbps', maxHeight: 1080, bitrate: 5000001 }); + options.push({ name: '1080p - 4Mbps', maxHeight: 1080, bitrate: 4000002 }); } else if (maxAllowedWidth >= 1260) { options.push({ name: '720p - 10Mbps', maxHeight: 720, bitrate: 10000000 }); @@ -119,14 +120,22 @@ })[0].maxHeight; } + var isVlc = AppInfo.isNativeApp && $.browser.android; var bitrateSetting = AppSettings.maxStreamingBitrate(); + if (isVlc) { + // Work around vlc 1080p stutter for now + if ((maxHeight || 1080) >= 1080) { + bitrateSetting = Math.min(bitrateSetting, 4000002); + } + } + var canPlayWebm = self.canPlayWebm(); var profile = {}; profile.MaxStreamingBitrate = bitrateSetting; - profile.MaxStaticBitrate = 40000000; + profile.MaxStaticBitrate = 4000000; profile.MusicStreamingTranscodingBitrate = Math.min(bitrateSetting, 192000); profile.DirectPlayProfiles = []; @@ -303,8 +312,6 @@ }] }); - var isVlc = AppInfo.isNativeApp && $.browser.android; - if (!isVlc) { profile.CodecProfiles.push({ Type: 'VideoAudio', diff --git a/dashboard-ui/scripts/pluginspage.js b/dashboard-ui/scripts/pluginspage.js index b928ab7d65..4f928dcfc0 100644 --- a/dashboard-ui/scripts/pluginspage.js +++ b/dashboard-ui/scripts/pluginspage.js @@ -29,7 +29,7 @@ }); } - function getPluginCardHtml(plugin, pluginConfigurationPages) { + function getPluginCardHtml(plugin, getTextLinesCallback, pluginConfigurationPages) { var configPage = $.grep(pluginConfigurationPages, function (pluginConfigurationPage) { return pluginConfigurationPage.PluginId == plugin.Id; @@ -96,6 +96,10 @@ html += plugin.Version; html += "
"; + if (getTextLinesCallback) { + html += getTextLinesCallback(plugin); + } + // cardFooter html += ""; @@ -108,16 +112,16 @@ return html; } - function renderPlugins(page, plugins) { + function renderPlugins(page, plugins, getTextLinesCallback) { ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration").done(function (configPages) { - populateList(page, plugins, configPages); + populateList(page, plugins, getTextLinesCallback, configPages); }); } - function populateList(page, plugins, pluginConfigurationPages) { + function populateList(page, plugins, getTextLinesCallback, pluginConfigurationPages) { plugins = plugins.sort(function (plugin1, plugin2) { @@ -126,7 +130,7 @@ }); var html = plugins.map(function (p) { - return getPluginCardHtml(p, pluginConfigurationPages); + return getPluginCardHtml(p, getTextLinesCallback, pluginConfigurationPages); }).join(''); @@ -187,7 +191,7 @@ ActionSheetElement.show({ items: menuItems, - positionTo: card, + positionTo: elem, callback: function (resultId) { switch (resultId) { diff --git a/dashboard-ui/themes/ios.css b/dashboard-ui/themes/ios.css index e546c476dd..cf853caf6f 100644 --- a/dashboard-ui/themes/ios.css +++ b/dashboard-ui/themes/ios.css @@ -66,6 +66,15 @@ html, body, .ui-btn, .pageTitle { color: #FF2D55 !important; } +.channelTimeslotHeader { + border-right-color: #FF2D55 !important; +} + +.channelTimeslotHeader, .timeslotHeader { + background: #FF2D55 !important; +} + + .libraryViewNav { border-top: 1px solid #333 !important; } diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index f581af89dc..d95fc6070c 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -149,6 +149,8 @@ paper-button .fa { color: inherit; width: 100%; vertical-align: middle; + font-family: inherit; + font-weight: inherit; } .clearLink {