diff --git a/dashboard-ui/autoorganizelog.html b/dashboard-ui/autoorganizelog.html index 4e6a7a4eb6..d68fa26e27 100644 --- a/dashboard-ui/autoorganizelog.html +++ b/dashboard-ui/autoorganizelog.html @@ -2,18 +2,15 @@
-
-
-
+
- diff --git a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js index ff49e11a40..92764cfc27 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js +++ b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/alphapicker.js @@ -1,4 +1,4 @@ -define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-button-light'], function (focusManager, layoutManager) { +define(['focusManager', 'css!./style.css', 'clearButtonStyle', 'paper-icon-button-light'], function (focusManager) { function focus() { var selected = this.querySelector('.selected'); @@ -52,10 +52,6 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', element.innerHTML = html; - if (options.mode != 'keyboard') { - element.querySelector('.alphaPickerButton').classList.add('selected'); - } - element.classList.add('focusable'); element.focus = focus; } @@ -85,7 +81,6 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', if (document.activeElement == alphaFocusedElement) { var value = alphaFocusedElement.getAttribute('data-value'); - self.value(value, true); } } @@ -103,7 +98,7 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', return elem; } - function onAlphaPickerClick(e) { + function onAlphaPickerInKeyboardModeClick(e) { var alphaPickerButton = parentWithClass(e.target, 'alphaPickerButton'); @@ -118,6 +113,21 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', } } + function onAlphaPickerClick(e) { + + var alphaPickerButton = parentWithClass(e.target, 'alphaPickerButton'); + + if (alphaPickerButton) { + var value = alphaPickerButton.getAttribute('data-value'); + + if (currentValue == value.toUpperCase()) { + self.value(null, true); + } else { + self.value(value, true); + } + } + } + function onAlphaPickerFocusIn(e) { if (alphaFocusTimeout) { @@ -159,13 +169,13 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', } if (options.mode == 'keyboard') { - element.addEventListener('click', onAlphaPickerClick); + element.addEventListener('click', onAlphaPickerInKeyboardModeClick); } - if (layoutManager.tv) { + if (options.valueChangeEvent !== 'click') { element.addEventListener('focus', onAlphaPickerFocusIn, true); } else { - element.addEventListener('click', onAlphaPickerFocusIn); + element.addEventListener('click', onAlphaPickerClick); } } else { @@ -174,9 +184,9 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', itemsContainer.removeEventListener('focus', onItemsFocusIn, true); } - element.removeEventListener('click', onAlphaPickerClick); + element.removeEventListener('click', onAlphaPickerInKeyboardModeClick); element.removeEventListener('focus', onAlphaPickerFocusIn, true); - element.removeEventListener('click', onAlphaPickerFocusIn); + element.removeEventListener('click', onAlphaPickerClick); } }; @@ -202,30 +212,41 @@ define(['focusManager', 'layoutManager', 'css!./style.css', 'clearButtonStyle', var currentValue; self.value = function (value, applyValue) { - if (value != null) { + var btn, selected; - value = value.toUpperCase(); - currentValue = value; + if (value !== undefined) { + if (value != null) { - if (options.mode != 'keyboard') { - var selected = element.querySelector('.selected'); - var btn = element.querySelector('.alphaPickerButton[data-value=\'' + value + '\']'); + value = value.toUpperCase(); + currentValue = value; - if (btn && btn != selected) { - btn.classList.add('selected'); + if (options.mode != 'keyboard') { + selected = element.querySelector('.selected'); + btn = element.querySelector('.alphaPickerButton[data-value=\'' + value + '\']'); + + if (btn && btn != selected) { + btn.classList.add('selected'); + } + if (selected && selected != btn) { + selected.classList.remove('selected'); + } } - if (selected && selected != btn) { + } else { + currentValue = value; + + selected = element.querySelector('.selected'); + if (selected) { selected.classList.remove('selected'); } } + } - if (applyValue) { - element.dispatchEvent(new CustomEvent("alphavaluechanged", { - detail: { - value: value - } - })); - } + if (applyValue) { + element.dispatchEvent(new CustomEvent("alphavaluechanged", { + detail: { + value: value + } + })); } return currentValue; diff --git a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/style.css b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/style.css index 6abb9dd1fe..8ec59ca75a 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/alphapicker/style.css +++ b/dashboard-ui/bower_components/emby-webcomponents/alphapicker/style.css @@ -45,7 +45,7 @@ button.alphaPickerButton { opacity: 1; } -.alphaPickerButton:focus { +.layout-tv .alphaPickerButton:focus { background-color: #52B54B; opacity: 1; color: #fff; diff --git a/dashboard-ui/css/dashboard.css b/dashboard-ui/css/dashboard.css index 72cae68937..f64c8a1939 100644 --- a/dashboard-ui/css/dashboard.css +++ b/dashboard-ui/css/dashboard.css @@ -289,7 +289,7 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB } .mainDrawerPanel:not([narrow]) .content-primary { - padding-top: 110px; + padding-top: 90px; padding-bottom: 3em; } @@ -305,12 +305,12 @@ a[data-role='button'], .type-interior button:not([data-role='none']):not(.clearB .mainDrawerPanel:not([narrow]) .content-primary { padding-right: 1.5em; - padding-left: 3em; + padding-left: 2em; } } .mainDrawerPanel:not([narrow]) .withTabs .content-primary { - padding-top: 135px !important; + padding-top: 125px !important; } .mainDrawerPanel:not([narrow]) .content-primary ul:first-child { diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 707fc4a7da..c1d7f8f29d 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1028,18 +1028,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { right: 20px; } -.alphabetPicker a { - display: block; - text-decoration: none; - padding: 1px 2px 1px 5px; - font-weight: 500; -} - - .alphabetPicker a:not(.selectedCharacter) { - color: #bbb !important; - } - - .selectedCharacter { color: #52B54B !important; } @@ -1091,7 +1079,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { @media all and (max-height: 480px) { .alphabetPicker { - display: none; + display: none !important; } } @@ -1123,8 +1111,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { @media all and (max-height: 650px) { .vertical.alphabetPicker .alphaPickerButton { - padding-top: 2px!important; - padding-bottom: 2px!important; + padding-top: 2px !important; + padding-bottom: 2px !important; } } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 49e470e07c..bf86891ea2 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -643,22 +643,26 @@ progress { height: 16px; } -.supporterPromotion { - margin: 1em 0; +.supporterPromotionContainer { + margin: 0 0 2em; } @media all and (min-width: 800px) { - .supporterPromotion:not(.inlineSupporterPromotion) { - position: absolute; - top: 110px; - right: 20px; - margin: 0; + .supporterPromotionContainer { + display: flex; + flex-direction: row-reverse; } - .inlineSupporterPromotion { - display: inline-block; + .supporterPromotion { + text-align: center; + padding: 0 2em; } + + .supporterPromotion button { + padding-left: 2em; + padding-right: 2em; + } } .nativeApp *:not(input):not(select):not(textarea) { diff --git a/dashboard-ui/devices/ios/ios.css b/dashboard-ui/devices/ios/ios.css index 476ab08e87..817454c193 100644 --- a/dashboard-ui/devices/ios/ios.css +++ b/dashboard-ui/devices/ios/ios.css @@ -171,3 +171,7 @@ h1, h1 a { .videoSubtitles { font-size: 200% !important; } + +.alphabetPicker { + right: 5px !important; +} diff --git a/dashboard-ui/scripts/autoorganizelog.js b/dashboard-ui/scripts/autoorganizelog.js index e756a7a898..10efcc756f 100644 --- a/dashboard-ui/scripts/autoorganizelog.js +++ b/dashboard-ui/scripts/autoorganizelog.js @@ -257,9 +257,9 @@ }); if (result.TotalRecordCount) { - $('.btnClearLog', page).show(); + page.querySelector('.btnClearLog').classList.remove('hide'); } else { - $('.btnClearLog', page).hide(); + page.querySelector('.btnClearLog').classList.add('hide'); } } @@ -312,7 +312,7 @@ $('.btnOrganize', page).taskButton({ mode: 'on', progressElem: page.querySelector('.organizeProgress'), - panel: $('.organizeTaskPanel', page), + panel: page.querySelector('.organizeTaskPanel'), taskKey: 'AutoOrganize' }); diff --git a/dashboard-ui/scripts/dashboardpage.js b/dashboard-ui/scripts/dashboardpage.js index 4ef119925c..767e3409ff 100644 --- a/dashboard-ui/scripts/dashboardpage.js +++ b/dashboard-ui/scripts/dashboardpage.js @@ -1313,29 +1313,24 @@ })(jQuery, document, window); - (function () { + pageClassOn('pageshow', "type-interior", function () { - $(document).on('pageshow', ".type-interior", function () { + var page = this; - var page = this; + Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) { - Dashboard.getPluginSecurityInfo().then(function (pluginSecurityInfo) { + if (!page.querySelector('.customSupporterPromotion')) { - if (!$('.customSupporterPromotion', page).length) { - $('.supporterPromotion', page).remove(); + $('.supporterPromotion', page).remove(); - if (!pluginSecurityInfo.IsMBSupporter && AppInfo.enableSupporterMembership) { + if (!pluginSecurityInfo.IsMBSupporter && AppInfo.enableSupporterMembership) { - var html = ''; + var html = ''; - $('.content-primary', page).append(html); - } + page.querySelector('.content-primary').insertAdjacentHTML('afterbegin', html); } - - }); - + } }); - })(); - + }); }); \ No newline at end of file diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index 9e6651f470..52686926cd 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -260,7 +260,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); $(view).on('click', '.mediaItem', onListItemClick); diff --git a/dashboard-ui/scripts/livetvstatus.js b/dashboard-ui/scripts/livetvstatus.js index 08ff170c69..336a346489 100644 --- a/dashboard-ui/scripts/livetvstatus.js +++ b/dashboard-ui/scripts/livetvstatus.js @@ -316,7 +316,7 @@ html += ''; html += ''; - html += ''; + html += ''; html += ''; } @@ -325,11 +325,49 @@ var elem = $('.providerList', page).html(html); - $('.btnDelete', elem).on('click', function () { + $('.btnOptions', elem).on('click', function () { var id = this.getAttribute('data-id'); - deleteProvider(page, id); + showProviderOptions(page, id, this); + }); + } + + function showProviderOptions(page, id, button) { + + var items = []; + + items.push({ + name: Globalize.translate('ButtonDelete'), + id: 'delete' + }); + + items.push({ + name: Globalize.translate('MapChannels'), + id: 'map' + }); + + require(['actionsheet'], function (actionsheet) { + + actionsheet.show({ + items: items, + positionTo: button + + }).then(function (id) { + + switch (id) { + + case 'delete': + deleteProvider(page, id); + break; + case 'map': + alert('coming soon'); + break; + default: + break; + } + }); + }); } diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index ea0ee1d293..467e821a23 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -285,7 +285,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); context.querySelector('.itemsContainer').addEventListener('needsrefresh', function () { diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index 63da5df9c5..586111da79 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -174,7 +174,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); tabContent.querySelector('.itemsContainer').addEventListener('needsrefresh', function () { diff --git a/dashboard-ui/scripts/musicalbumartists.js b/dashboard-ui/scripts/musicalbumartists.js index 20e3177ba6..ac61cd0cb8 100644 --- a/dashboard-ui/scripts/musicalbumartists.js +++ b/dashboard-ui/scripts/musicalbumartists.js @@ -169,7 +169,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); self.renderTab = function () { diff --git a/dashboard-ui/scripts/musicalbums.js b/dashboard-ui/scripts/musicalbums.js index 0aa2164b96..06aee81694 100644 --- a/dashboard-ui/scripts/musicalbums.js +++ b/dashboard-ui/scripts/musicalbums.js @@ -222,7 +222,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); self.renderTab = function () { diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js index 6b74f14160..ed2d8dafda 100644 --- a/dashboard-ui/scripts/musicartists.js +++ b/dashboard-ui/scripts/musicartists.js @@ -169,7 +169,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); self.renderTab = function () { diff --git a/dashboard-ui/scripts/sections.js b/dashboard-ui/scripts/sections.js index 9ba8cbfe0f..20e795667a 100644 --- a/dashboard-ui/scripts/sections.js +++ b/dashboard-ui/scripts/sections.js @@ -205,7 +205,7 @@ var html = ''; html += '
'; - html += '

Try Emby Theater

'; + html += '

Try Emby Theater

'; var nameText = AppInfo.isNativeApp ? 'Emby Theater' : 'Emby Theater'; html += '

A beautiful app for your TV and large screen tablet. ' + nameText + ' runs on Windows, Xbox One, Google Chrome, FireFox, Microsoft Edge and Opera.

'; @@ -223,7 +223,7 @@ var html = ''; html += '
'; - html += '

Try Emby Premiere

'; + html += '

Try Emby Premiere

'; var learnMoreText = AppInfo.isNativeApp ? '' : 'Learn more'; diff --git a/dashboard-ui/scripts/taskbutton.js b/dashboard-ui/scripts/taskbutton.js index 60a91943ea..b163337c02 100644 --- a/dashboard-ui/scripts/taskbutton.js +++ b/dashboard-ui/scripts/taskbutton.js @@ -25,9 +25,9 @@ if (options.panel) { if (task) { - $(options.panel).show(); + options.panel.classList.remove('hide'); } else { - $(options.panel).hide(); + options.panel.classList.add('hide'); } } @@ -157,7 +157,7 @@ } if (options.panel) { - $(options.panel).hide(); + options.panel.classList.add('hide'); } if (options.mode == 'off') { diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 01d18bd7ba..91f56dccd6 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -202,7 +202,8 @@ }); self.alphaPicker = new alphaPicker({ - element: alphaPickerElement + element: alphaPickerElement, + valueChangeEvent: 'click' }); tabContent.querySelector('.btnFilter').addEventListener('click', function () { diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index 0ea8ccdaac..09d451e60f 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -2371,5 +2371,6 @@ "LabelBindToLocalNetworkAddress": "Bind to local network address:", "LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the http server to. If left empty, the server will bind to all availabile addresses. Changing this value requires restarting Emby Server.", "TitleHostingSettings": "Hosting Settings", - "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default." + "SettingsWarning": "Changing these values may cause instability or connectivity failures. If you experience any problems, we recommend changing them back to default.", + "MapChannels": "Map Channels" } diff --git a/dashboard-ui/syncactivity.html b/dashboard-ui/syncactivity.html index 84200c2477..30d4e43190 100644 --- a/dashboard-ui/syncactivity.html +++ b/dashboard-ui/syncactivity.html @@ -3,11 +3,6 @@
-
- - -
-
+
+ + +
+