diff --git a/dashboard-ui/css/card.css b/dashboard-ui/css/card.css index 345cd51a91..ef10339944 100644 --- a/dashboard-ui/css/card.css +++ b/dashboard-ui/css/card.css @@ -48,7 +48,7 @@ } .largeCardMargin .cardBox { - margin: 7px; + margin: 6px; } /*@media all and (max-width: 600px) { @@ -174,6 +174,15 @@ max-width: 100%; } +.lightCardFooter { + background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 100%) !important; /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.7))) !important; /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* Opera 11.10+ */ + background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* IE10+ */ + background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.7) 100%) !important; /* W3C */ +} + .fullCardFooter { right: 0; } diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 61c40e1a19..3ccdc416ef 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -940,6 +940,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { color: #fff; background: rgb(51, 136, 204); background: rgba(51, 136, 204, .9); + line-height: 1.2; } .unidentifiedIndicator { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 14c6d22955..47ee74991f 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -130,6 +130,10 @@ h1 a:hover { font-weight: 400; } +.ui-listview > .ui-li-divider { + line-height: 1.5; + line-height: initial; +} /* Make all panels vertically scrollable If this causes any problems then perhaps require a css class to activate diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index c4c649d21c..c3b228dd59 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -282,7 +282,7 @@ items: result.Items, preferThumb: true, shape: 'backdrop', - overlayText: true, + overlayText: screenWidth >= 600 && !AppInfo.hasLowImageBandwidth, showTitle: true, showParentTitle: true, context: 'home', diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 4d37f56c74..b3e08f4253 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1407,7 +1407,7 @@ cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key); } - if (options.showChildCountIndicator && item.ChildCount) { + if (options.showChildCountIndicator && item.ChildCount && options.showLatestItemsPopup !== false) { cssClass += ' groupedCard'; } @@ -1513,7 +1513,7 @@ footerOverlayed = true; } else if (progressHtml) { - html += '
'; + html += '
'; html += "
"; html += progressHtml; html += "
"; diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index 32728a1efa..58461a8129 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -26,6 +26,7 @@ items: items, showUnplayedIndicator: false, showChildCountIndicator: true, + showLatestItemsPopup: false, shape: "square", showTitle: true, showParentTitle: true, diff --git a/dashboard-ui/scripts/selectserver.js b/dashboard-ui/scripts/selectserver.js index 985afa8fab..6155261b0a 100644 --- a/dashboard-ui/scripts/selectserver.js +++ b/dashboard-ui/scripts/selectserver.js @@ -72,7 +72,7 @@ html += '
'; var icon = server.Id == 'new' ? 'plus-circle' : 'globe'; - html += ''; + html += ''; } html += "
"; @@ -302,7 +302,7 @@ html += ''; html += '
'; - html += ''; + html += ''; html += "
"; // cardContent diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index c7ccf8cfb4..39adfc2aaa 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1395,7 +1395,7 @@ var Dashboard = { name = "Internet Explorer"; } else if ($.browser.opera) { name = "Opera"; - } else if ($.browser.firefox || $.browser.mozilla) { + } else if ($.browser.mozilla) { name = "Firefox"; } diff --git a/dashboard-ui/scripts/songs.js b/dashboard-ui/scripts/songs.js index 80c43f8850..5a3fd1ee49 100644 --- a/dashboard-ui/scripts/songs.js +++ b/dashboard-ui/scripts/songs.js @@ -53,7 +53,8 @@ limit: query.Limit, totalRecordCount: result.TotalRecordCount, viewButton: true, - showLimit: false + showLimit: false, + updatePageSizeSetting: false }); $('.listTopPaging', page).html(pagingHtml).trigger('create'); diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index ce6cee7499..c9101130ce 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -1,6 +1,6 @@ (function ($, document) { - var view = LibraryBrowser.getDefaultItemsView('Thumb', 'Thumb'); + var view = LibraryBrowser.getDefaultItemsView('Poster', 'Poster'); // The base query options var query = { diff --git a/dashboard-ui/thirdparty/browser.js b/dashboard-ui/thirdparty/browser.js index a610804827..4ea3a44f6f 100644 --- a/dashboard-ui/thirdparty/browser.js +++ b/dashboard-ui/thirdparty/browser.js @@ -909,7 +909,6 @@ var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || /(safari)[ \/]([\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(webkit)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || /(msie) ([\w.]+)/.exec(ua) || ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || []; @@ -922,7 +921,7 @@ var browser = match[1] || ""; if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) { - + // http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update browser = "msie"; } @@ -950,22 +949,22 @@ browser[matched.platform] = true; } - if (browser.webkit && !browser.chrome) { + if (userAgent.toLowerCase().indexOf("webkit") != -1 && !browser.chrome && !browser.msie) { browser.safari = true; } - // Chrome is Webkit, but Webkit is also Safari. - if (browser.chrome || browser.safari) { - browser.webkit = true; - } - var md = new MobileDetect(userAgent); - browser.mobile = md.mobile(); + if (md.mobile()) { + browser.mobile = true; + } else { + browser.mobile = null; + } if (browser.msie && !browser.mobile && userAgent.toLowerCase().indexOf("xbox") != -1) { browser.tv = true; } + jQuery.browser = browser; })(jQuery, window); diff --git a/dashboard-ui/thirdparty/cordova/remotecontrols.js b/dashboard-ui/thirdparty/cordova/remotecontrols.js new file mode 100644 index 0000000000..15a9257455 --- /dev/null +++ b/dashboard-ui/thirdparty/cordova/remotecontrols.js @@ -0,0 +1,170 @@ +(function () { + + // Reports media playback to the device for lock screen control + + var currentPlayer; + var lastPlayerState; + + function updatePlayerState(state) { + + if (!state.NowPlayingItem) { + hideNowPlayingBar(); + return; + } + + lastPlayerState = state; + + var playState = state.PlayState || {}; + + var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || ''; + var parts = nameHtml.split('
'); + + var artist = parts.length == 1 ? '' : parts[0]; + var title = parts[parts.length - 1]; + var album = state.NowPlayingItem || ''; + var duration = state.NowPlayingItem.RunTimeTicks ? (state.NowPlayingItem / 10000000) : 0; + var elapsedTime = playState.PositionTicks ? (playState.PositionTicks / 10000000) : 0; + + var url = ''; + var imgHeight = 100; + + var nowPlayingItem = state.NowPlayingItem; + + if (nowPlayingItem.PrimaryImageTag) { + + url = ApiClient.getScaledImageUrl(nowPlayingItem.PrimaryImageItemId, { + type: "Primary", + height: imgHeight, + tag: nowPlayingItem.PrimaryImageTag + }); + } + else if (nowPlayingItem.BackdropImageTag) { + + url = ApiClient.getScaledImageUrl(nowPlayingItem.BackdropItemId, { + type: "Backdrop", + height: imgHeight, + tag: nowPlayingItem.BackdropImageTag, + index: 0 + }); + + } else if (nowPlayingItem.ThumbImageTag) { + + url = ApiClient.getScaledImageUrl(nowPlayingItem.ThumbImageItemId, { + type: "Thumb", + height: imgHeight, + tag: nowPlayingItem.ThumbImageTag + }); + } + + var params = [artist, title, album, url, duration, elapsedTime]; + window.remoteControls.updateMetas(onUpdateMetasSuccess, onUpdateMetasFail, params); + } + + function onStateChanged(e, state) { + + //console.log('nowplaying event: ' + e.type); + var player = this; + + if (player.isDefaultPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') { + return; + } + + updatePlayerState(state); + } + + function onPlaybackStart(e, state) { + + console.log('nowplaying event: ' + e.type); + + var player = this; + + player.beginPlayerUpdates(); + + onStateChanged.call(player, e, state); + } + + function onPlaybackStopped(e, state) { + + console.log('nowplaying event: ' + e.type); + var player = this; + + player.endPlayerUpdates(); + + hideNowPlayingBar(); + } + + function releaseCurrentPlayer() { + + if (currentPlayer) { + + $(currentPlayer).off('.cordovaremote'); + currentPlayer.endPlayerUpdates(); + currentPlayer = null; + + hideNowPlayingBar(); + } + } + + function hideNowPlayingBar() { + + var artist = ""; + var title = ""; + var album = ""; + var image = ""; + var duration = 0; + var elapsedTime = 0; + + var params = [artist, title, album, image, duration, elapsedTime]; + window.remoteControls.updateMetas(onUpdateMetasSuccess, onUpdateMetasFail, params); + } + + function onUpdateMetasSuccess() { + + console.log('onUpdateMetasSuccess'); + } + + function onUpdateMetasFail(fail) { + + console.log('onUpdateMetasFail' + fail); + } + + function bindToPlayer(player) { + + releaseCurrentPlayer(); + + currentPlayer = player; + + if (!player.isLocalPlayer) { + return; + } + + player.getPlayerState().done(function (state) { + + if (state.NowPlayingItem) { + player.beginPlayerUpdates(); + } + + onStateChanged.call(player, { type: 'init' }, state); + }); + + $(player).on('playbackstart.cordovaremote', onPlaybackStart) + .on('playbackstop.cordovaremote', onPlaybackStopped) + .on('playstatechange.cordovaremote', onStateChanged) + .on('positionchange.cordovaremote', onStateChanged); + } + + document.addEventListener("deviceready", function () { + + $(function () { + + $(MediaController).on('playerchange', function () { + + bindToPlayer(MediaController.getCurrentPlayer()); + }); + + bindToPlayer(MediaController.getCurrentPlayer()); + }); + + }, false); + +})(); \ No newline at end of file diff --git a/dashboard-ui/thirdparty/apiclient/cordova/serverdiscovery.js b/dashboard-ui/thirdparty/cordova/serverdiscovery.js similarity index 100% rename from dashboard-ui/thirdparty/apiclient/cordova/serverdiscovery.js rename to dashboard-ui/thirdparty/cordova/serverdiscovery.js