diff --git a/dashboard-ui/css/materialize.css b/dashboard-ui/css/materialize.css index 732e84d8f0..434872489a 100644 --- a/dashboard-ui/css/materialize.css +++ b/dashboard-ui/css/materialize.css @@ -56,6 +56,7 @@ -ms-transition: 0.2s ease-out; transition: 0.2s ease-out; cursor: pointer; + position: relative; } .btn-floating { @@ -185,7 +186,7 @@ button.btn:not(.btn-inline),button.btn-large:not(.btn-inline) { .btn i { position: absolute; - left: 24px; + left: 10px; } .btn-large i { diff --git a/dashboard-ui/scripts/connectlogin.js b/dashboard-ui/scripts/connectlogin.js index b715605db8..03975e9ab3 100644 --- a/dashboard-ui/scripts/connectlogin.js +++ b/dashboard-ui/scripts/connectlogin.js @@ -2,9 +2,7 @@ function onLoggedIn() { - // Need to switch from https to http - - window.location = getWindowUrl().replace(/https/gi, 'http').replace(/connectlogin/gi, 'selectserver'); + Dashboard.navigate('selectserver.html'); } function login(page, username, password) { @@ -36,7 +34,6 @@ var password = $('#txtManualPassword', page).val(); login(page, user, password); - } window.ConnectLoginPage = { diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index eac84a0c1a..8012e46c54 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1361,6 +1361,13 @@ lines.push(itemCountHtml); } + if (options.textLines) { + var additionalLines = options.textLines(item); + for (var i = 0, length = additionalLines.length; i < length; i++) { + lines.push(additionalLines[i]); + } + } + if (options.showSongCount) { var songLine = ''; diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index f493645765..b892ae55a9 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -15,13 +15,15 @@ html += ''; html += '
MEDIABROWSER
'; - html += '
'; - html += ''; - html += ''; - html += ''; - html += '
'; + if (user.localUser) { + html += '
'; + html += ''; + html += ''; + html += ''; + html += '
'; + } html += '
'; diff --git a/dashboard-ui/scripts/search.js b/dashboard-ui/scripts/search.js index 0b9f226c77..0882ff4606 100644 --- a/dashboard-ui/scripts/search.js +++ b/dashboard-ui/scripts/search.js @@ -66,6 +66,45 @@ return data.replace(regexp, "$1"); } + function getAdditionalTextLines(hint) { + + if (hint.Type == "Audio") { + + return [[hint.AlbumArtist, hint.Album].join(" - ")]; + + } + else if (hint.Type == "MusicAlbum") { + + return [hint.AlbumArtist]; + + } + else if (hint.Type == "MusicArtist") { + + return [Globalize.translate('LabelArtist')]; + + } + else if (hint.Type == "Movie") { + + return [Globalize.translate('LabelMovie')]; + + } + else if (hint.Type == "MusicVideo") { + + return [Globalize.translate('LabelMusicVideo')]; + } + else if (hint.Type == "Episode") { + + return [Globalize.translate('LabelEpisode')]; + + } + else if (hint.Type == "Series") { + + return [Globalize.translate('LabelSeries')]; + } + + return [hint.Type]; + } + function getSearchHintHtml(hint) { var html = ''; @@ -314,7 +353,8 @@ lazy: true, overlayText: false, showTitle: true, - centerText: true + coverImage: true, + textLines: getAdditionalTextLines }); $('.itemsContainer', elem).html(html).lazyChildren(); } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 434e225cec..2cbde794ca 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1322,6 +1322,7 @@ var Dashboard = { }; window.ConnectionManager = new MediaBrowser.ConnectionManager(jQuery, Logger, credentialProvider, appName, appVersion, deviceName, deviceId, capabilities); + if (Dashboard.isConnectMode()) { $(ConnectionManager).on('apiclientcreated', function (e, apiClient) { @@ -1355,7 +1356,9 @@ var Dashboard = { ConnectionManager.addApiClient(ApiClient); } - Dashboard.importCss(ApiClient.getUrl('Branding/Css')); + if (window.ApiClient) { + Dashboard.importCss(ApiClient.getUrl('Branding/Css')); + } })(); diff --git a/dashboard-ui/selectserver.html b/dashboard-ui/selectserver.html index 923f81f123..0591849e07 100644 --- a/dashboard-ui/selectserver.html +++ b/dashboard-ui/selectserver.html @@ -9,7 +9,14 @@
-

${HeaderSelectServer}

+ +
+

${HeaderSelectServer}

+ + + ${ButtonHelp} + +