diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 9997428b7..aedc4733f 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -117,7 +117,7 @@ } } -@media all and (min-width: 1920px) { +@media all and (min-width: 1600px) { .ehsContent { width: 1200px; diff --git a/dashboard-ui/css/notifications.css b/dashboard-ui/css/notifications.css index 296fbe2fc..57602a036 100644 --- a/dashboard-ui/css/notifications.css +++ b/dashboard-ui/css/notifications.css @@ -1,9 +1,17 @@ -.btnNotifications { - text-decoration: none!important; +.notificationsFlyout { + width: 250px; +} + +.notificationsPanelModelOpen { + right: 250px!important; +} + +.btnNotifications { + text-decoration: none !important; } .btnNotificationsInner { - text-decoration: none!important; + text-decoration: none !important; vertical-align: middle; -moz-border-radius: 2px; -webkit-border-radius: 2px; @@ -35,14 +43,14 @@ background-image: -o-linear-gradient(top,#4d90fe,#4787ed); background-image: linear-gradient(top,#4d90fe,#4787ed); border-color: #3079ed; - color: #fff!important; + color: #fff !important; } .levelWarning { background-color: #FF7537; background-image: none; border-color: #FF7537; - color: #fff!important; + color: #fff !important; } .levelError { @@ -54,20 +62,12 @@ background-image: -o-linear-gradient(top,#dd4b39,#d14836); background-image: linear-gradient(top,#dd4b39,#d14836); border-color: #c6322a; - color: #fff!important; -} - -.notificationsFlyout { - width: 300px; + color: #fff !important; } .flyoutNotification { - border-top: 1px solid #ccc; - background: #f8f8f8; - color: #555; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + border-top: 1px solid #eee; + padding: 0 0 .5em; } .flyoutNotification p { @@ -77,35 +77,38 @@ } .flyoutNotification:last-child { - border-bottom: 1px solid #ccc; + border-bottom: 1px solid #eee; } .notificationName { - font-weight: bold; - color: #555; +} + +.notificationTime { + color: green; } .notificationImage { + margin: 0 .5em 0 1em; + padding: .5em 0; + display: inline-block; + vertical-align: top; display: none; } -.unreadFlyoutNotification { - background-color: #ECEEF4; +.notificationContent { + display: inline-block; + vertical-align: top; + overflow: hidden; } -.btnMarkReadContainer, .btnNotificationListContainer { - padding: 0 .5em; +.unreadFlyoutNotification { + color: blue; } .notificationsList { border-bottom: 1px solid #ddd; } - .notificationsList .flyoutNotification { - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - } - .imgNotification, .imgNotificationInner { width: 40px; height: 40px; @@ -121,7 +124,6 @@ background-size: 50% auto; } - .imgNotificationNormal { background-color: #4d90fe; background-image: -webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#4787ed)); @@ -157,48 +159,3 @@ .imgNotificationWarning .imgNotificationInner { background-image: url(images/notifications/error.png); } - -.notificationContent { - padding: 0 .5em; -} - -@media all and (min-width: 350px) { - .notificationsFlyout { - width: 320px; - } -} - -@media all and (min-width: 400px) { - .notificationsFlyout { - width: 370px; - } -} - -@media all and (min-width: 450px) { - .notificationsFlyout { - width: 400px; - } - - .notificationImage { - margin: 0 .5em 0 1em; - padding: .5em 0; - display: inline-block; - vertical-align: top; - } - - .notificationContent { - display: inline-block; - vertical-align: top; - overflow: hidden; - } -} - -@media all and (min-width: 500px) { - .notificationsFlyout { - width: 450px; - } - - .notificationContent p { - max-width: 350px; - } -} diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index c204df488..3c280202f 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -488,7 +488,7 @@ } } -@media all and (min-width: 1920px) { +@media all and (min-width: 1600px) { .backdropPosterItem { width: 290px; diff --git a/dashboard-ui/dlnaprofile.html b/dashboard-ui/dlnaprofile.html index 27bc4c667..cadc9e895 100644 --- a/dashboard-ui/dlnaprofile.html +++ b/dashboard-ui/dlnaprofile.html @@ -257,6 +257,11 @@ +

+ ${HeaderHttpHeaders} + +

+
@@ -566,6 +571,46 @@
+ + + $('.identificationHeaderForm').off('submit', DlnaProfilePage.onIdentificationHeaderFormSubmit).on('submit', DlnaProfilePage.onIdentificationHeaderFormSubmit); + diff --git a/dashboard-ui/scripts/dlnaprofile.js b/dashboard-ui/scripts/dlnaprofile.js index b4bb41758..9101b8565 100644 --- a/dashboard-ui/scripts/dlnaprofile.js +++ b/dashboard-ui/scripts/dlnaprofile.js @@ -47,6 +47,8 @@ var idInfo = profile.Identification || {}; + renderIdentificationHeaders(page, idInfo.Headers || []); + $('#txtInfoFriendlyName', page).val(profile.FriendlyName || ''); $('#txtInfoModelName', page).val(profile.ModelName || ''); $('#txtInfoModelNumber', page).val(profile.ModelNumber || ''); @@ -97,6 +99,76 @@ renderSubProfiles(page, profile); } + function renderIdentificationHeaders(page, headers) { + + var index = 0; + + var html = ''; + + var elem = $('.httpHeaderIdentificationList', page).html(html).trigger('create'); + + $('.btnDeleteIdentificationHeader', elem).on('click', function () { + + var itemIndex = parseInt(this.getAttribute('data-index')); + + currentProfile.Identification.Headers.splice(itemIndex, 1); + + renderIdentificationHeaders(page, currentProfile.Identification.Headers); + }); + } + + function editIdentificationHeader(page, header) { + + isSubProfileNew = header == null; + header = header || {}; + currentSubProfile = header; + + var popup = $('#identificationHeaderPopup', page); + + $('#txtIdentificationHeaderName', popup).val(header.Name || ''); + $('#txtIdentificationHeaderValue', popup).val(header.Value || ''); + $('#selectMatchType', popup).val(header.Match || 'Equals').selectmenu('refresh'); + + popup.popup('open'); + } + + function saveIdentificationHeader(page) { + + currentSubProfile.Name = $('#txtIdentificationHeaderName', page).val(); + currentSubProfile.Value = $('#txtIdentificationHeaderValue', page).val(); + currentSubProfile.Match = $('#selectMatchType', page).val(); + + if (isSubProfileNew) { + + currentProfile.Identification.Headers.push(currentSubProfile); + } + + renderIdentificationHeaders(page, currentProfile.Identification.Headers); + + currentSubProfile = null; + + $('#identificationHeaderPopup', page).popup('close'); + } + function renderSubProfiles(page, profile) { renderDirectPlayProfiles(page, profile.DirectPlayProfiles); @@ -816,6 +888,11 @@ }); + $('.btnAddIdentificationHttpHeader', page).on('click', function () { + + editIdentificationHeader(page); + }); + }).on('pageshow', "#dlnaProfilePage", function () { var page = this; @@ -890,6 +967,16 @@ saveResponseProfile(page); + return false; + }, + + onIdentificationHeaderFormSubmit: function() { + + var form = this; + var page = $(form).parents('.page'); + + saveIdentificationHeader(page); + return false; } }; diff --git a/dashboard-ui/scripts/indexpage.js b/dashboard-ui/scripts/indexpage.js index e608aa48c..b77043e10 100644 --- a/dashboard-ui/scripts/indexpage.js +++ b/dashboard-ui/scripts/indexpage.js @@ -129,7 +129,7 @@ var options = { - Limit: screenWidth >= 2400 ? 24 : (screenWidth >= 1920 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))), + Limit: screenWidth >= 2400 ? 24 : (screenWidth >= 1600 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))), Fields: "PrimaryImageAspectRatio", IsPlayed: false, IsFolder: false @@ -164,7 +164,7 @@ var options = { - Limit: screenWidth >= 2400 ? 10 : (screenWidth >= 1920 ? 10 : (screenWidth >= 1440 ? 8 : (screenWidth >= 800 ? 7 : 6))), + Limit: screenWidth >= 2400 ? 10 : (screenWidth >= 1600 ? 10 : (screenWidth >= 1440 ? 8 : (screenWidth >= 800 ? 7 : 6))), Fields: "PrimaryImageAspectRatio", Filters: "IsUnplayed", UserId: userId @@ -279,7 +279,7 @@ SortOrder: "Descending", MediaTypes: "Video", Filters: "IsResumable", - Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1200 ? 9 : 6), + Limit: screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 9 : 6), Recursive: true, Fields: "PrimaryImageAspectRatio", CollapseBoxSetItems: false, @@ -356,7 +356,7 @@ var options = { - Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1440 ? 5 : (screenWidth >= 800 ? 6 : 6)), + Limit: screenWidth >= 1600 ? 5 : (screenWidth >= 1440 ? 5 : (screenWidth >= 800 ? 6 : 6)), Fields: "PrimaryImageAspectRatio", Filters: "IsUnplayed", UserId: Dashboard.getCurrentUserId(), diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index d06952c1a..43e994ea2 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1185,11 +1185,6 @@ $("#pause", videoElement).hide().removeClass("fadeOut"); }, 300); - // Pause stop timer - self.pauseStop = setTimeout(function () { - self.stop(); - }, 5 * 60 * 1000); // 5 minutes - }).on("playing.mediaplayerevent", function (e) { $('#video-playButton', videoControls).hide(); @@ -1199,9 +1194,6 @@ $("#play", videoElement).hide().removeClass("fadeOut"); }, 300); - // Remove pause setop timer - self.clearPauseStop(); - }).on("timeupdate.mediaplayerevent", function () { if (!isPositionSliderActive) { @@ -1248,7 +1240,7 @@ unbindEventsForPlayback(); - }).on('ended.playnext', self.playNextAfterEnded); + }).one('ended.playnext', self.playNextAfterEnded); bindEventsForPlayback(); diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index edb3a7329..8ca9c3e7f 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -53,19 +53,8 @@ return playerTime; }; - self.clearPauseStop = function () { - - if (self.pauseStop) { - console.log('clearing pause stop timer'); - window.clearTimeout(self.pauseStop); - self.pauseStop = null; - } - }; - self.playNextAfterEnded = function () { - $(this).off('ended.playnext'); - self.nextTrack(); }; @@ -177,7 +166,7 @@ self.updateCanClientSeek(this); - $(this).on('ended.playbackstopped', self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded); + $(this).on('ended.playbackstopped', self.onPlaybackStopped).one('ended.playnext', self.playNextAfterEnded); self.startProgressInterval(); sendProgressUpdate(); @@ -595,6 +584,7 @@ var newItem = self.playlist[newIndex]; if (newItem) { + Dashboard.getCurrentUser().done(function (user) { self.playInternal(newItem, 0, user); @@ -899,6 +889,7 @@ $(this).remove(); } + elem.src = null; elem.src = ""; self.currentMediaElement = null; self.currentItem = null; @@ -1077,8 +1068,6 @@ $('body').removeClass('bodyWithPopupOpen'); - self.clearPauseStop(); - var playerElement = this; $(playerElement).off('.mediaplayerevent').off('ended.playbackstopped'); @@ -1256,7 +1245,7 @@ self.setCurrentTime(self.getCurrentTicks(this)); - }).on("ended.playbackstopped", self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded)[0]; + }).on("ended.playbackstopped", self.onPlaybackStopped).one('ended.playnext', self.playNextAfterEnded)[0]; }; function canPlayAudioStreamDirect(audioStream) { diff --git a/dashboard-ui/scripts/movieslatest.js b/dashboard-ui/scripts/movieslatest.js index e70778c5a..8acd9397e 100644 --- a/dashboard-ui/scripts/movieslatest.js +++ b/dashboard-ui/scripts/movieslatest.js @@ -12,7 +12,7 @@ var options = { IncludeItemTypes: "Movie", - Limit: screenWidth >= 1920 ? 28 : (screenWidth >= 1440 ? 30 : (screenWidth >= 800 ? 28 : 18)), + Limit: screenWidth >= 1600 ? 28 : (screenWidth >= 1440 ? 30 : (screenWidth >= 800 ? 28 : 18)), Fields: "PrimaryImageAspectRatio", ParentId: parentId, IsPlayed: false diff --git a/dashboard-ui/scripts/moviesrecommended.js b/dashboard-ui/scripts/moviesrecommended.js index 5d85b04d7..e92152f7f 100644 --- a/dashboard-ui/scripts/moviesrecommended.js +++ b/dashboard-ui/scripts/moviesrecommended.js @@ -50,7 +50,7 @@ SortOrder: "Descending", IncludeItemTypes: "Movie", Filters: "IsResumable", - Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1200 ? 6 : 3), + Limit: screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 6 : 3), Recursive: true, Fields: "PrimaryImageAspectRatio", CollapseBoxSetItems: false, @@ -81,7 +81,7 @@ userId: Dashboard.getCurrentUserId(), categoryLimit: screenWidth >= 1200 ? 4 : 3, - ItemLimit: screenWidth >= 1920 ? 7 : (screenWidth >= 1200 ? 6 : 5), + ItemLimit: screenWidth >= 1600 ? 7 : (screenWidth >= 1200 ? 6 : 5), Fields: "PrimaryImageAspectRatio" }); diff --git a/dashboard-ui/scripts/musicrecommended.js b/dashboard-ui/scripts/musicrecommended.js index 8f18398e5..f3b511b9f 100644 --- a/dashboard-ui/scripts/musicrecommended.js +++ b/dashboard-ui/scripts/musicrecommended.js @@ -11,7 +11,7 @@ var options = { IncludeItemTypes: "Audio", - Limit: screenWidth >= 1920 ? 18 : (screenWidth >= 1200 ? 10 : 12), + Limit: screenWidth >= 1600 ? 18 : (screenWidth >= 1200 ? 10 : 12), Fields: "PrimaryImageAspectRatio", ParentId: parentId }; @@ -34,7 +34,7 @@ SortBy: "DatePlayed", SortOrder: "Descending", IncludeItemTypes: "Audio", - Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1200 ? 5 : 6), + Limit: screenWidth >= 1600 ? 6 : (screenWidth >= 1200 ? 5 : 6), Recursive: true, Fields: "PrimaryImageAspectRatio,AudioInfo", Filters: "IsPlayed", @@ -64,7 +64,7 @@ SortBy: "PlayCount", SortOrder: "Descending", IncludeItemTypes: "Audio", - Limit: screenWidth >= 1920 ? 12 : (screenWidth >= 1200 ? 10 : 12), + Limit: screenWidth >= 1600 ? 12 : (screenWidth >= 1200 ? 10 : 12), Recursive: true, Fields: "PrimaryImageAspectRatio,AudioInfo", Filters: "IsPlayed", diff --git a/dashboard-ui/scripts/notifications.js b/dashboard-ui/scripts/notifications.js index be13278b9..823c65d1a 100644 --- a/dashboard-ui/scripts/notifications.js +++ b/dashboard-ui/scripts/notifications.js @@ -33,35 +33,30 @@ self.showNotificationsFlyout = function () { - var context = this; + var html = '
'; - var html = '
'; + html += '

'; + html += '' + Globalize.translate('HeaderNotifications') + ''; + html += '' + Globalize.translate('ButtonViewNotifications') + ''; + html += '

'; - html += '' + Globalize.translate('ButtonClose') + ''; + html += '
'; + + html += '
Loading...'; - html += '
'; - html += '

Notifications

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

Loading...'; - - html += '

'; - - html += ''; html += ''; - html += '
'; html += '
'; $(document.body).append(html); - $('.notificationsFlyout').popup({ positionTo: context }).trigger('create').popup("open").on("popupafterclose", function () { + $('.notificationsFlyout').panel({}).panel('option', 'classes.modalOpen', 'notificationsPanelModelOpen ui-panel-dismiss-open').trigger('create').panel("open").on("panelclose", function () { - $(this).off("popupafterclose").remove(); + $(this).off("panelclose").remove(); }).on('click', '.btnMarkRead', function () { @@ -73,7 +68,7 @@ self.markNotificationsRead(ids, function () { - $('.notificationsFlyout').popup("close"); + $('.notificationsFlyout').panel("close"); }); @@ -175,7 +170,7 @@ html += '

' + notification.Name + '

'; - html += '

' + humane_date(notification.Date) + '

'; + html += '

' + humane_date(notification.Date) + '

'; if (notification.Description) { html += '

' + notification.Description + '

'; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 6457a4023..43cd58431 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -494,7 +494,7 @@ var Dashboard = { Dashboard.getCurrentUser().done(function (user) { - var html = '
'; + var html = '
'; html += '

'; diff --git a/dashboard-ui/scripts/tvlatest.js b/dashboard-ui/scripts/tvlatest.js index fc01feb6d..2c4092c9c 100644 --- a/dashboard-ui/scripts/tvlatest.js +++ b/dashboard-ui/scripts/tvlatest.js @@ -12,7 +12,7 @@ var options = { IncludeItemTypes: "Episode", - Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15), + Limit: screenWidth >= 1600 ? 24 : (screenWidth >= 1440 ? 16 : 15), Fields: "PrimaryImageAspectRatio", ParentId: parentId, IsPlayed: false