diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index c81b2e4254..2b58e72614 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -307,14 +307,11 @@ } } -@media all and (min-width: 400px) { +@media all and (min-width: 500px) { .smallBackdropCard { width: 33.3%; } -} - -@media all and (min-width: 500px) { .squareCard { width: 33.3%; diff --git a/dashboard-ui/css/livetv.css b/dashboard-ui/css/livetv.css index 75790b092e..63c3543bc6 100644 --- a/dashboard-ui/css/livetv.css +++ b/dashboard-ui/css/livetv.css @@ -1,8 +1,26 @@ -.tvGuideHeader.headroom--unpinned { +.tvGuideHeader { + white-space: nowrap; + position: fixed; + top: 98px; + left: 0; + z-index: 100; + max-width: 100%; +} + +.bottomSecondaryNav .tvGuideHeader { + top: 48px; +} + +.tvGuideHeader.headroom--unpinned { -webkit-transform: translateY(-98px); transform: translateY(-98px); } +.bottomSecondaryNav .tvGuideHeader.headroom--unpinned { + -webkit-transform: translateY(-48px); + transform: translateY(-48px); +} + .tvProgramSectionHeader { margin: 0; } diff --git a/dashboard-ui/livetvguide.html b/dashboard-ui/livetvguide.html index 7138729e02..be456b649f 100644 --- a/dashboard-ui/livetvguide.html +++ b/dashboard-ui/livetvguide.html @@ -16,7 +16,7 @@
-
+
diff --git a/dashboard-ui/musicalbumartists.html b/dashboard-ui/musicalbumartists.html index d602e7ccb8..5821b1b823 100644 --- a/dashboard-ui/musicalbumartists.html +++ b/dashboard-ui/musicalbumartists.html @@ -28,7 +28,7 @@
-
+
diff --git a/dashboard-ui/musicartists.html b/dashboard-ui/musicartists.html index 50fbd4eca9..3e1edbd5af 100644 --- a/dashboard-ui/musicartists.html +++ b/dashboard-ui/musicartists.html @@ -28,7 +28,7 @@
-
+
diff --git a/dashboard-ui/scripts/connectlogin.js b/dashboard-ui/scripts/connectlogin.js index b29e6ece89..bffa5f0f42 100644 --- a/dashboard-ui/scripts/connectlogin.js +++ b/dashboard-ui/scripts/connectlogin.js @@ -41,7 +41,7 @@ Dashboard.serverAddress(apiClient.serverAddress()); Dashboard.setCurrentUser(apiClient.getCurrentUserId(), apiClient.accessToken()); - window.location = 'index.html'; + window.location.href = 'index.html'; } break; case MediaBrowser.ConnectionState.ServerSignIn: diff --git a/dashboard-ui/scripts/forgotpasswordpin.js b/dashboard-ui/scripts/forgotpasswordpin.js index 65d5aa9ef6..7f8dd113be 100644 --- a/dashboard-ui/scripts/forgotpasswordpin.js +++ b/dashboard-ui/scripts/forgotpasswordpin.js @@ -17,7 +17,7 @@ callback: function () { - window.location = 'login.html'; + window.location.href = 'login.html'; } }); return; diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index fe83c33a1b..f5ba8aa7f3 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -89,7 +89,7 @@ html += ''; html += '
'; - html += "
"; + html += "
"; html += ''; html += '' + item.Name + ''; html += "
"; diff --git a/dashboard-ui/scripts/loginpage.js b/dashboard-ui/scripts/loginpage.js index ca473646b3..103fccf6d1 100644 --- a/dashboard-ui/scripts/loginpage.js +++ b/dashboard-ui/scripts/loginpage.js @@ -110,9 +110,9 @@ Dashboard.setCurrentUser(user.Id, result.AccessToken); if (user.Policy.IsAdministrator && !serverId) { - window.location = "dashboard.html?u=" + user.Id + '&t=' + result.AccessToken; + window.location.href = "dashboard.html?u=" + user.Id + '&t=' + result.AccessToken; } else { - window.location = "index.html?u=" + user.Id + '&t=' + result.AccessToken; + window.location.href = "index.html?u=" + user.Id + '&t=' + result.AccessToken; } }).fail(function () { diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index fc0a973ee5..8359647b84 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -48,15 +48,6 @@ updateFilterControls(page); var trigger = false; - if (AppInfo.hasLowImageBandwidth) { - if (view == 'Thumb') { - view = 'ThumbCard'; - } - else if (view == 'Poster') { - view = 'PosterCard'; - } - } - if (view == "Thumb") { html = LibraryBrowser.getPosterViewHtml({ items: result.Items, diff --git a/dashboard-ui/scripts/selectserver.js b/dashboard-ui/scripts/selectserver.js index 71513d34b5..9a7322329d 100644 --- a/dashboard-ui/scripts/selectserver.js +++ b/dashboard-ui/scripts/selectserver.js @@ -16,13 +16,13 @@ Dashboard.serverAddress(apiClient.serverAddress()); Dashboard.setCurrentUser(apiClient.getCurrentUserId(), apiClient.accessToken()); - window.location = 'index.html'; + window.location.href = 'index.html'; } break; case MediaBrowser.ConnectionState.ServerSignIn: { if (Dashboard.isRunningInCordova()) { - window.location = 'login.html?serverid=' + result.Servers[0].Id; + window.location.href = 'login.html?serverid=' + result.Servers[0].Id; } else { showServerConnectionFailure(); } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 0aaa596d77..d46923e848 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -211,10 +211,10 @@ var Dashboard = { 'connectlogin.html'; if (logoutWithServer === false) { - window.location = loginPage; + window.location.href = loginPage; } else { ConnectionManager.logout().done(function () { - window.location = loginPage; + window.location.href = loginPage; }); } @@ -668,7 +668,7 @@ var Dashboard = { } if (isConnectMode) { - html += '

' + Globalize.translate('ButtonSelectServer') + ''; + html += '

' + Globalize.translate('ButtonSelectServer') + ''; } html += '

'; @@ -1507,7 +1507,6 @@ var AppInfo = {}; AppInfo.enableHeaderImages = true; AppInfo.enableMovieHomeSuggestions = true; - AppInfo.enableAppStorePolicy = isCordova; if ($.browser.safari) { @@ -1524,6 +1523,7 @@ var AppInfo = {}; AppInfo.enableDetailsMenuImages = false; AppInfo.enableHeaderImages = false; AppInfo.enableMovieHomeSuggestions = false; + AppInfo.enableLargeCardMargin = true; } } else { @@ -1643,7 +1643,7 @@ var AppInfo = {}; initFastClick(); } - if (AppInfo.hasLowImageBandwidth) { + if (AppInfo.enableLargeCardMargin) { $(document.body).addClass('largeCardMargin'); } @@ -1679,6 +1679,10 @@ var AppInfo = {}; $(document.body).addClass('movieTrailersTabDisabled'); } + if (AppInfo.enableBottomTabs) { + $(document.body).addClass('bottomSecondaryNav'); + } + if (Dashboard.isRunningInCordova()) { $(document).addClass('nativeApp'); } diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 5e4a2ae66d..e2a207086a 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -43,15 +43,6 @@ updateFilterControls(page); - if (AppInfo.hasLowImageBandwidth) { - if (view == 'Thumb') { - view = 'ThumbCard'; - } - else if (view == 'Poster') { - view = 'PosterCard'; - } - } - if (view == "Thumb") { html = LibraryBrowser.getPosterViewHtml({ diff --git a/dashboard-ui/scripts/userlibraryaccess.js b/dashboard-ui/scripts/userlibraryaccess.js index 4a2c650907..ef844c9aca 100644 --- a/dashboard-ui/scripts/userlibraryaccess.js +++ b/dashboard-ui/scripts/userlibraryaccess.js @@ -141,6 +141,10 @@ }).get(); + // Legacy + user.Policy.BlockedChannels = null; + user.Policy.BlockedMediaFolders = null; + ApiClient.updateUserPolicy(user.Id, user.Policy).done(function () { onSaveComplete(page); }); diff --git a/dashboard-ui/thirdparty/cordova/serverdiscovery.js b/dashboard-ui/thirdparty/cordova/serverdiscovery.js index 01d4f73f53..8222ee735a 100644 --- a/dashboard-ui/thirdparty/cordova/serverdiscovery.js +++ b/dashboard-ui/thirdparty/cordova/serverdiscovery.js @@ -14,6 +14,15 @@ return String.fromCharCode.apply(null, new Uint16Array(buf)); } + function getResultCode(result) { + + if (result != null && result.resultCode != null) { + return result.resultCode; + } + + return result; + } + function findServersInternal(timeoutMs) { var deferred = DeferredBuilder.Deferred(); @@ -36,6 +45,8 @@ function startTimer() { + console.log('starting udp receive timer with timeout ms: ' + timeoutMs); + timeout = setTimeout(function () { isTimedOut = true; @@ -83,9 +94,9 @@ console.log('chrome.sockets.udp.bind'); - chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', port, function (result) { + chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function (result) { - if (result != 0) { + if (getResultCode(result) != 0) { console.log('bind fail: ' + result); deferred.resolveWith(null, [servers]); chrome.sockets.udp.close(createInfo.socketId); @@ -97,7 +108,7 @@ console.log('chrome.sockets.udp.send'); chrome.sockets.udp.send(createInfo.socketId, data, '255.255.255.255', port, function (result) { - if (result != 0) { + if (getResultCode(result) != 0) { console.log('send fail: ' + result); deferred.resolveWith(null, [servers]); chrome.sockets.udp.close(createInfo.socketId);