diff --git a/dashboard-ui/autoorganizelog.html b/dashboard-ui/autoorganizelog.html index 245429cd7c..98a8072d23 100644 --- a/dashboard-ui/autoorganizelog.html +++ b/dashboard-ui/autoorganizelog.html @@ -4,7 +4,7 @@ ${TitleAutoOrganize} -
+
diff --git a/dashboard-ui/connectlogin.html b/dashboard-ui/connectlogin.html index 2856a1d21d..a40912342a 100644 --- a/dashboard-ui/connectlogin.html +++ b/dashboard-ui/connectlogin.html @@ -3,7 +3,7 @@ ${TitleSignIn} - +
@@ -23,9 +23,8 @@
-

@@ -41,7 +40,7 @@

@@ -62,9 +61,8 @@

- ${ButtonCancel} @@ -95,7 +93,7 @@
${ButtonCancel} @@ -108,7 +106,7 @@

- ${ButtonNext} + ${ButtonNext}
diff --git a/dashboard-ui/cordova/android/mediasession.js b/dashboard-ui/cordova/android/mediasession.js index e5a821298b..b8576f0e57 100644 --- a/dashboard-ui/cordova/android/mediasession.js +++ b/dashboard-ui/cordova/android/mediasession.js @@ -13,6 +13,13 @@ return; } + var isLocalPlayer = MediaController.getPlayerInfo().isLocalPlayer || false; + + // Local players do their own notifications + if (isLocalPlayer) { + return; + } + // dummy this up if (eventName == 'init') { eventName = 'positionchange'; @@ -28,10 +35,12 @@ var artist = parts.length == 1 ? '' : parts[0]; var title = parts[parts.length - 1]; var album = state.NowPlayingItem.Album || ''; - var duration = state.NowPlayingItem.RunTimeTicks ? (state.NowPlayingItem.RunTimeTicks / 10000000) : 0; - var position = playState.PositionTicks ? (playState.PositionTicks / 10000000) : 0; var itemId = state.NowPlayingItem.Id; + // Convert to ms + var duration = state.NowPlayingItem.RunTimeTicks ? (state.NowPlayingItem.RunTimeTicks / 10000) : 0; + var position = playState.PositionTicks ? (playState.PositionTicks / 10000) : 0; + var isPaused = playState.IsPaused || false; var canSeek = playState.CanSeek || false; @@ -75,8 +84,6 @@ } } - var isLocalPlayer = MediaController.getPlayerInfo().isLocalPlayer || false; - MainActivity.updateMediaSession(eventName, isLocalPlayer, itemId, title, artist, album, parseInt(duration), parseInt(position), url, canSeek, isPaused); lastUpdateTime = new Date().getTime(); } diff --git a/dashboard-ui/cordova/android/vlcplayer.js b/dashboard-ui/cordova/android/vlcplayer.js index cae7efe871..54d83dd883 100644 --- a/dashboard-ui/cordova/android/vlcplayer.js +++ b/dashboard-ui/cordova/android/vlcplayer.js @@ -88,7 +88,7 @@ } }; - self.setCurrentSrc = function (val) { + self.setCurrentSrc = function (val, item, mediaSource) { if (!val) { self.destroy(); @@ -96,7 +96,8 @@ } if (type == 'audio') { - AndroidVlcPlayer.playAudioVlc(val); + + AndroidVlcPlayer.playAudioVlc(val, JSON.stringify(item), JSON.stringify(mediaSource), posterUrl); } else { AndroidVlcPlayer.playVideoVlc(val); } @@ -125,7 +126,9 @@ playerState = {}; }; + var posterUrl; self.setPoster = function (url) { + posterUrl = url; }; self.report = function (eventName, duration, position, isPaused, volume) { diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js index a84fd8ecfb..b4841fd8a1 100644 --- a/dashboard-ui/cordova/registrationservices.js +++ b/dashboard-ui/cordova/registrationservices.js @@ -86,6 +86,7 @@ function getInAppPurchaseElement(info) { + require(['paperbuttonstyle']); cancelInAppPurchase(); var html = ''; @@ -125,14 +126,20 @@ if (info.price) { unlockText = Globalize.translate('ButtonUnlockPrice', info.price); } - html += ''; + html += '

'; + html += '' + unlockText + ''; + html += '

'; } if (info.enableSupporterUnlock) { - html += ''; + html += '

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

'; } - html += ''; + html += '

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

'; html += '
'; diff --git a/dashboard-ui/css/detailtable.css b/dashboard-ui/css/detailtable.css index e3c47faca4..5b0adec10c 100644 --- a/dashboard-ui/css/detailtable.css +++ b/dashboard-ui/css/detailtable.css @@ -53,15 +53,15 @@ white-space: nowrap; } -.detailTableButtonsCell button { - margin-top: 0; - margin-bottom: 0; -} - - .detailTableButtonsCell button + button { - margin-left: .5em; + .detailTableButtonsCell button { + margin-top: 0; + margin-bottom: 0; } + .detailTableButtonsCell button + button { + margin-left: .5em; + } + @media all and (min-width: 600px) { .tabletColumn { display: table-cell; @@ -80,7 +80,6 @@ background-color: rgba(0,0,0,.1); } - .stripedTable tbody tr:nth-child(odd) td, .stripedTable tbody tr:nth-child(odd) th { background-color: #eeeeee; /* non-RGBA fallback */ diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index 361e74570f..e0db1eac52 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -54,7 +54,7 @@ } .mainDrawerPanel #drawer { - z-index: 1000 !important; + z-index: 1099 !important; position: fixed !important; bottom: 0; height: auto !important; @@ -72,7 +72,7 @@ .mainDrawerPanel #scrim { /* Give it at least something to make it visible */ - z-index: 1000; + z-index: 1098; /* It defaults to absolute, not visible after scrolling */ position: fixed; } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index f81f6454df..bc56565afb 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -311,7 +311,8 @@ body { overflow-y: scroll !important; font-size: 13px; font-family: Roboto, Arial, Helvetica, sans-serif; - -webkit-overflow-scrolling: touch; + /*Can't use this with safari or it causes some content to disappear*/ + /*-webkit-overflow-scrolling: touch;*/ /* Remove the white default from jqm */ background-color: transparent !important; } @@ -1410,4 +1411,4 @@ progress { .supporterMembershipDisabled .tabSupporterMembership { display: none; -} +} \ No newline at end of file diff --git a/dashboard-ui/livetvguide.html b/dashboard-ui/livetvguide.html index 43fee797f1..f6f897193a 100644 --- a/dashboard-ui/livetvguide.html +++ b/dashboard-ui/livetvguide.html @@ -34,12 +34,7 @@ diff --git a/dashboard-ui/livetvstatus.html b/dashboard-ui/livetvstatus.html index 1a4c8472b1..08d97ed96e 100644 --- a/dashboard-ui/livetvstatus.html +++ b/dashboard-ui/livetvstatus.html @@ -4,7 +4,7 @@ ${TitleLiveTV} -
+
diff --git a/dashboard-ui/livetvsuggested.html b/dashboard-ui/livetvsuggested.html index 5978f09a01..3c674895c7 100644 --- a/dashboard-ui/livetvsuggested.html +++ b/dashboard-ui/livetvsuggested.html @@ -29,7 +29,7 @@

${HeaderUpcomingMovies}

- ${ButtonMoreItems} + ${ButtonMoreItems}

@@ -37,7 +37,7 @@

${HeaderUpcomingSports}

- ${ButtonMoreItems} + ${ButtonMoreItems}

diff --git a/dashboard-ui/login.html b/dashboard-ui/login.html index f3027c5080..0bc45d4ba8 100644 --- a/dashboard-ui/login.html +++ b/dashboard-ui/login.html @@ -17,11 +17,8 @@ - ${ButtonCancel} diff --git a/dashboard-ui/nowplaying.html b/dashboard-ui/nowplaying.html index 3852d462a6..bc183865d8 100644 --- a/dashboard-ui/nowplaying.html +++ b/dashboard-ui/nowplaying.html @@ -148,11 +148,11 @@
-
+
-
+
diff --git a/dashboard-ui/reports.html b/dashboard-ui/reports.html index 85a56b982f..fe9317b9f9 100644 --- a/dashboard-ui/reports.html +++ b/dashboard-ui/reports.html @@ -4,7 +4,7 @@ Emby -
+
diff --git a/dashboard-ui/scheduledtasks.html b/dashboard-ui/scheduledtasks.html index 1114f5e852..c8224d5f29 100644 --- a/dashboard-ui/scheduledtasks.html +++ b/dashboard-ui/scheduledtasks.html @@ -10,7 +10,7 @@

${ScheduledTasksHelp}

-
+
diff --git a/dashboard-ui/scripts/backdrops.js b/dashboard-ui/scripts/backdrops.js index 019ac14664..42bf78b28b 100644 --- a/dashboard-ui/scripts/backdrops.js +++ b/dashboard-ui/scripts/backdrops.js @@ -99,13 +99,7 @@ function setDefault(page) { - var backdropContainer = $('.backdropContainer'); - - if (backdropContainer.length) { - backdropContainer.css('backgroundImage', 'url(css/images/splash.jpg)'); - } else { - $(document.body).prepend('
'); - } + getElement().css('backgroundImage', 'url(css/images/splash.jpg)'); $(page).addClass('backdropPage staticBackdropPage'); } diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index efe9a18caf..7c7aba19f7 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -420,10 +420,10 @@ Dashboard.navigate('itemdetails.html?id=' + albumid); break; case 'artist': - Dashboard.navigate('tembynamedetails.html?context=music&id=' + artistid); + Dashboard.navigate('itembynamedetails.html?context=music&id=' + artistid); break; case 'play': - MediaController.MediaController(itemId); + MediaController.play(itemId); break; case 'playallfromhere': $(card).parents('.itemsContainer').trigger('playallfromhere', [index]); @@ -1075,6 +1075,11 @@ return false; } + function resetImages(page) { + + $('.cardImage', page).remove(); + } + $(document).on('pageinitdepends', ".libraryPage", function () { var page = this; @@ -1127,6 +1132,11 @@ hideSelections(page); $('.viewTabButton:first', page).trigger('click'); + + }).on('pagebeforehide', ".libraryPage", function () { + + var page = this; + resetImages(page); }); function renderUserDataChanges(card, userData) { diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index 2d0093d404..4ed22aad22 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -40,7 +40,7 @@ } if (!$.browser.mobile && !AppInfo.isNativeApp) { - html += 'settings'; + html += 'settings'; //html += ''; } @@ -168,11 +168,13 @@ var requiresDrawerRefresh = true; var requiresDashboardDrawerRefresh = true; + var lastOpenTime = new Date().getTime(); function openMainDrawer() { var drawerPanel = $('.mainDrawerPanel')[0]; drawerPanel.openDrawer(); + lastOpenTime = new Date().getTime(); } function onMainDrawerOpened() { @@ -202,7 +204,6 @@ requiresDrawerRefresh = false; - updateSidebarOnClicks(); updateLibraryNavLinks($.mobile.activePage); }); } @@ -215,9 +216,6 @@ var drawerPanel = $('.mainDrawerPanel')[0]; drawerPanel.closeDrawer(); } - function updateSidebarOnClicks() { - $('.mainDrawerContent a').off('click.closeMainDrawer').on('click.closeMainDrawer', closeMainDrawer); - } function ensureDrawerStructure(drawer) { @@ -277,18 +275,18 @@ html += '
'; html += '
'; - html += '' + Globalize.translate('ButtonHome') + ''; + html += '' + Globalize.translate('ButtonHome') + ''; } else { html += '
'; - html += ''; + html += ''; html += '
'; html += Globalize.translate('ButtonHome'); html += '
'; } - html += '' + Globalize.translate('ButtonRemote') + ''; + html += '' + Globalize.translate('ButtonRemote') + ''; $('.userheader', drawer).html(html).lazyChildren(); } @@ -328,33 +326,33 @@ html += '
'; html += '' + Globalize.translate('ButtonManageServer') + ''; - html += '' + Globalize.translate('ButtonMetadataManager') + ''; + html += '' + Globalize.translate('ButtonMetadataManager') + ''; if (!$.browser.mobile && !AppInfo.isTouchPreferred) { - html += '' + Globalize.translate('ButtonReports') + ''; + html += '' + Globalize.translate('ButtonReports') + ''; } html += '
'; html += ''; @@ -440,7 +438,7 @@ color = "#293AAE"; } - return '' + i.Name + ''; + return '' + i.Name + ''; }).join(''); @@ -454,7 +452,6 @@ $('.libraryMenuButtonText').html(text); }); - updateSidebarOnClicks(); }); if (user.Policy.IsAdministrator) { @@ -508,11 +505,17 @@ onLinkClicked: function (link) { - closeMainDrawer(); + // There doesn't seem to be a way to detect if the drawer is in the process of opening, so try to handle that here + if ((new Date().getTime() - lastOpenTime) > 200) { - setTimeout(function () { - Dashboard.navigate(link.href); - }, 1000); + closeMainDrawer(); + + setTimeout(function () { + Dashboard.navigate(link.href); + }, 300); + } + + return false; } }; diff --git a/dashboard-ui/scripts/livetvguide.js b/dashboard-ui/scripts/livetvguide.js index 29cadb03d8..050a9d5e88 100644 --- a/dashboard-ui/scripts/livetvguide.js +++ b/dashboard-ui/scripts/livetvguide.js @@ -19,15 +19,6 @@ var channelsPromise; - function showLoadingMessage(page) { - - Dashboard.showModalLoadingMsg(); - } - - function hideLoadingMessage(page) { - Dashboard.hideModalLoadingMsg(); - } - function normalizeDateToTimeslot(date) { var minutesOffset = date.getMinutes() - cellCurationMinutes; @@ -51,7 +42,7 @@ function reloadGuide(page) { - showLoadingMessage(page); + Dashboard.showModalLoadingMsg(); channelQuery.userId = Dashboard.getCurrentUserId(); @@ -77,7 +68,7 @@ renderGuide(page, date, channelsResult.Items, programsResult.Items); - hideLoadingMessage(page); + Dashboard.hideModalLoadingMsg(); }); @@ -407,14 +398,16 @@ function reloadPage(page) { - showLoadingMessage(page); - $('.guideRequiresUnlock', page).hide(); RegistrationServices.validateFeature('livetv').done(function () { + Dashboard.showModalLoadingMsg(); + reloadPageAfterValidation(page, 1000); }).fail(function () { + Dashboard.showModalLoadingMsg(); + var limit = 5; $('.guideRequiresUnlock', page).show(); $('.unlockText', page).html(Globalize.translate('MessageLiveTvGuideRequiresUnlock', limit)); diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 15f7743cac..1254ac2518 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -746,7 +746,7 @@ html += '
'; html += '
'; - html += '

' + Globalize.translate('ButtonRemoteControl') + '

'; + html += '

' + Globalize.translate('ButtonRemoteControl') + '

'; html += '
'; diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index bcf7b21cd8..7fe7b82eb6 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -572,14 +572,14 @@ ApiClient.stopActiveEncodings(playSessionId).done(function () { self.startTimeTicksOffset = newPositionTicks; - mediaRenderer.setCurrentSrc(url); + mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource); }); self.updateTextStreamUrls(newPositionTicks || 0); } else { self.startTimeTicksOffset = newPositionTicks; - mediaRenderer.setCurrentSrc(url); + mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource); } } @@ -1669,7 +1669,7 @@ // Set volume first to avoid an audible change mediaRenderer.volume(initialVolume); mediaRenderer.setPoster(self.getPosterUrl(item)); - mediaRenderer.setCurrentSrc(audioUrl); + mediaRenderer.setCurrentSrc(audioUrl, item, mediaSource); $(mediaRenderer).on("volumechange.mediaplayerevent", function () { diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js index 3d91ec75b1..9cca4e8585 100644 --- a/dashboard-ui/scripts/nowplayingbar.js +++ b/dashboard-ui/scripts/nowplayingbar.js @@ -29,8 +29,8 @@ html += '
'; // The onclicks are needed due to the return false above - html += ''; - html += ''; + html += ''; + html += ''; html += ''; diff --git a/dashboard-ui/scripts/scheduledtaskspage.js b/dashboard-ui/scripts/scheduledtaskspage.js index d82524e446..034e6bf8ae 100644 --- a/dashboard-ui/scripts/scheduledtaskspage.js +++ b/dashboard-ui/scripts/scheduledtaskspage.js @@ -71,7 +71,7 @@ html += ""; - $('#divScheduledTasks', page).html(html).trigger('create'); + $('.divScheduledTasks', page).html(html).trigger('create'); } function getTaskProgressHtml(task) { @@ -157,7 +157,7 @@ elem = btnTask.addClass('btnStartTask').removeClass('btnStopTask').hide().data("icon", "action").attr("title", Globalize.translate('ButtonStart')); - elem.removeClass('ui-icon-stdeleteop').addClass('ui-icon-action'); + elem.removeClass('ui-icon-delete').addClass('ui-icon-action'); } } @@ -183,7 +183,7 @@ var page = this; - $('#divScheduledTasks', page).on('click', '.btnStartTask', function () { + $('.divScheduledTasks', page).on('click', '.btnStartTask', function () { var button = this; var id = button.getAttribute('data-taskid'); @@ -221,8 +221,6 @@ $(ApiClient).off("websocketmessage", onWebSocketMessage).off("websocketopen", onWebSocketConnectionOpen); stopInterval(); - - $('#divScheduledTasks', page).off('click', '.btnStartTask').off('click', '.btnStopTask'); }); })(jQuery, document, window); \ No newline at end of file diff --git a/dashboard-ui/scripts/selectserver.js b/dashboard-ui/scripts/selectserver.js index bbf6370a97..3d2016ce12 100644 --- a/dashboard-ui/scripts/selectserver.js +++ b/dashboard-ui/scripts/selectserver.js @@ -69,7 +69,7 @@ html += '
'; var icon = server.Id == 'new' ? 'plus-circle' : 'server'; - html += ''; + html += ''; } html += "
"; @@ -306,7 +306,7 @@ html += ''; html += '
'; - html += ''; + html += ''; html += "
"; // cardContent @@ -385,15 +385,6 @@ servers = servers.slice(0); - if (AppInfo.isNativeApp) { - servers.push({ - Name: Globalize.translate('ButtonNewServer'), - Id: 'new', - showOptions: false, - href: 'connectlogin.html?mode=manualserver' - }); - } - renderServers(page, servers); Dashboard.hideLoadingMsg(); @@ -415,6 +406,12 @@ } else { $(page).removeClass('libraryPage').removeClass('noSecondaryNavPage').addClass('standalonePage'); } + + if (AppInfo.isNativeApp) { + $('.addServer', page).show(); + } else { + $('.addServer', page).hide(); + } } $(document).on('pageinitdepends pagebeforeshowready', "#selectServerPage", function () { diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 687bb82c98..cdf08dbece 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -495,7 +495,7 @@ var Dashboard = { if (!elem.length) { - elem = $('
').appendTo(document.body); + elem = $('').appendTo(document.body); } @@ -929,7 +929,7 @@ var Dashboard = { name: Globalize.translate('TabMetadata'), href: "metadata.html", selected: page.hasClass('metadataConfigurationPage'), - icon: 'details' + icon: 'insert-drive-file' }, { name: Globalize.translate('TabPlayback'), href: "playbackconfiguration.html", @@ -1944,10 +1944,12 @@ var AppInfo = {}; require(['filesystem']); if (Dashboard.isRunningInCordova()) { - require(['cordova/connectsdk', 'scripts/registrationservices', 'cordova/volume', 'cordova/back']); + require(['cordova/connectsdk', 'scripts/registrationservices', 'cordova/back']); if ($.browser.android) { require(['cordova/android/androidcredentials', 'cordova/android/immersive', 'cordova/android/mediasession']); + } else { + require(['cordova/volume']); } if ($.browser.safari) { @@ -2038,6 +2040,10 @@ var AppInfo = {}; Dashboard.importCss('css/livetv.css'); return {}; }); + define("detailtablecss", [], function () { + Dashboard.importCss('css/detailtable.css'); + return {}; + }); if (Dashboard.isRunningInCordova() && $.browser.safari) { define("actionsheet", ["cordova/ios/actionsheet"]); diff --git a/dashboard-ui/selectserver.html b/dashboard-ui/selectserver.html index a2d2b6798e..81b7e58828 100644 --- a/dashboard-ui/selectserver.html +++ b/dashboard-ui/selectserver.html @@ -21,8 +21,12 @@ ${MessageNoServersAvailableToConnect}
+ +