diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json index d4d75eca65..adda4287b4 100644 --- a/dashboard-ui/bower_components/doc-ready/.bower.json +++ b/dashboard-ui/bower_components/doc-ready/.bower.json @@ -39,6 +39,6 @@ "commit": "cec8e49744a1e18b14a711eea77e201bb70de544" }, "_source": "git://github.com/desandro/doc-ready.git", - "_target": "~1.0.4", + "_target": "1.0.x", "_originalSource": "doc-ready" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json index 503ff0f3a9..4bf4a72b93 100644 --- a/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-keys-behavior/.bower.json @@ -29,14 +29,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior", + "homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior", "_release": "1.0.8", "_resolution": { "type": "version", "tag": "v1.0.8", "commit": "df29a9edcff3b4693707f1e3eebce5a1dc46e946" }, - "_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git", + "_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-a11y-keys-behavior" + "_originalSource": "PolymerElements/iron-a11y-keys-behavior" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-flex-layout/.bower.json b/dashboard-ui/bower_components/iron-flex-layout/.bower.json index d3322e963e..49f7c42683 100644 --- a/dashboard-ui/bower_components/iron-flex-layout/.bower.json +++ b/dashboard-ui/bower_components/iron-flex-layout/.bower.json @@ -27,14 +27,14 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", "iron-component-page": "polymerelements/iron-component-page#^1.0.0" }, - "homepage": "https://github.com/polymerelements/iron-flex-layout", + "homepage": "https://github.com/PolymerElements/iron-flex-layout", "_release": "1.0.5", "_resolution": { "type": "version", "tag": "v1.0.5", "commit": "00daa8acc95fe53d7cbbe5f9059241c4648ff22e" }, - "_source": "git://github.com/polymerelements/iron-flex-layout.git", + "_source": "git://github.com/PolymerElements/iron-flex-layout.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-flex-layout" + "_originalSource": "PolymerElements/iron-flex-layout" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-selector/.bower.json b/dashboard-ui/bower_components/iron-selector/.bower.json index ebb18c5b7b..52d44c1907 100644 --- a/dashboard-ui/bower_components/iron-selector/.bower.json +++ b/dashboard-ui/bower_components/iron-selector/.bower.json @@ -36,7 +36,7 @@ "tag": "v1.0.8", "commit": "e9a66727f3da0446f04956d4e4f1dcd51cdec2ff" }, - "_source": "git://github.com/polymerelements/iron-selector.git", + "_source": "git://github.com/PolymerElements/iron-selector.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-selector" + "_originalSource": "PolymerElements/iron-selector" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index 706b40f657..c59b1e8d80 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -50,7 +50,7 @@ "tag": "v1.0.18", "commit": "8bb2b1972158d3a28ca3a350003b8ca78c147b53" }, - "_source": "git://github.com/PolymerElements/paper-input.git", - "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-input" + "_source": "git://github.com/polymerelements/paper-input.git", + "_target": "^1.0.9", + "_originalSource": "polymerelements/paper-input" } \ No newline at end of file diff --git a/dashboard-ui/cordova/android/iap.js b/dashboard-ui/cordova/android/iap.js index f6ead6667f..d609380721 100644 --- a/dashboard-ui/cordova/android/iap.js +++ b/dashboard-ui/cordova/android/iap.js @@ -51,10 +51,7 @@ if (feature == 'embypremieremonthly') { return MainActivity.purchasePremiereMonthly(email); } - if (feature == 'embypremiereweekly') { - return MainActivity.purchasePremiereWeekly(email); - } - return MainActivity.purchaseUnlock(email); + return MainActivity.purchaseUnlock(); } function onPurchaseComplete(result) { @@ -97,10 +94,9 @@ var deferred = DeferredBuilder.Deferred(); - if (feature == 'playback') { - isPlaybackUnlockedViaOldApp(deferred); - } else if (feature == 'livetv') { - isLiveTvUnlockedViaOldApp(deferred); + if (feature == 'playback' || feature == 'livetv') { + deferred.resolveWith(null, [false]); + //isPlaybackUnlockedViaOldApp(deferred); } else { deferred.resolveWith(null, [false]); } @@ -131,16 +127,17 @@ function testDeviceId(deviceId) { - var deferred = DeferredBuilder.Deferred(); var cacheKey = 'oldapp-' + deviceId; var cacheValue = appStorage.getItem(cacheKey); if (cacheValue) { + var deferred = DeferredBuilder.Deferred(); deferred.resolveWith(null, [cacheValue == 'true']); + return deferred.promise(); } else { - HttpClient.send({ + return HttpClient.send({ type: 'GET', url: 'https://mb3admin.com/admin/service/statistics/appAccess?application=AndroidV1&deviceId=' + deviceId @@ -148,23 +145,14 @@ }).done(function () { appStorage.setItem(cacheKey, 'true'); - deferred.resolveWith(null, [true]); }).fail(function (e) { if (e.status == 404) { appStorage.setItem(cacheKey, 'false'); } - deferred.resolveWith(null, [false]); }); } - - return deferred.promise(); - } - - function isLiveTvUnlockedViaOldApp(deferred) { - - isPlaybackUnlockedViaOldApp(deferred); } window.IapManager = { diff --git a/dashboard-ui/cordova/imagestore.js b/dashboard-ui/cordova/imagestore.js index e9f93f17a8..30c237d466 100644 --- a/dashboard-ui/cordova/imagestore.js +++ b/dashboard-ui/cordova/imagestore.js @@ -111,6 +111,11 @@ setImageIntoElement(elem, url); } + //if ($.browser.safari) { + // setImageWithSdWebImage(elem, url); + // return; + //} + self.getImageUrl(url).done(function (localUrl) { setImageIntoElement(elem, localUrl); @@ -118,6 +123,32 @@ }).fail(onFail); }; + var imageIdIndex = 1; + + function setImageWithSdWebImage(elem, url) { + + var rect = elem.getBoundingClientRect(); + + var options = { + data: url, + index: imageIdIndex, + quality: 0, + scale: Math.round(rect.width) + 'x' + Math.round(rect.height), + downloadOptions: window.CollectionRepeatImageOptions.SDWebImageRetryFailed | window.CollectionRepeatImageOptions.SDWebImageLowPriority | window.CollectionRepeatImageOptions.SDWebImageAllowInvalidSSLCertificates + }; + + if (elem.classList.contains('coveredCardImage')) { + options.scale += '!'; + } + + imageIdIndex++; + + window.CollectionRepeatImage.getImage(options, function (data) { + var dataUrl = 'data:image/jpeg;base64,' + data; + elem.style.backgroundImage = "url('" + dataUrl + "')"; + }); + } + window.ImageStore = self; } diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 912de7705a..2bdc9b4c3e 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -1811,3 +1811,15 @@ span.itemCommunityRating:not(:empty) + .userDataIcons { -ms-transform: rotateZ(360deg); } } + +#criticReviewsContent.hiddenScrollX { + white-space: nowrap; +} + + #criticReviewsContent.hiddenScrollX .paperList { + min-width: 240px; + max-width: 90%; + display: inline-block; + vertical-align: top; + margin: 0 4px 0 0; + } diff --git a/dashboard-ui/favorites.html b/dashboard-ui/favorites.html index c150d890b8..a3c00117fc 100644 --- a/dashboard-ui/favorites.html +++ b/dashboard-ui/favorites.html @@ -8,7 +8,7 @@
-
+
diff --git a/dashboard-ui/scripts/appsettings.js b/dashboard-ui/scripts/appsettings.js index bfbf468234..666c370ccc 100644 --- a/dashboard-ui/scripts/appsettings.js +++ b/dashboard-ui/scripts/appsettings.js @@ -95,7 +95,7 @@ update('displayLanguage', val); } - return appStorage.getItem('displayLanguage') || 'en-US'; + return appStorage.getItem('displayLanguage') || navigator.language || navigator.userLanguage || 'en-US'; }, cameraUploadServers: function (val) { diff --git a/dashboard-ui/scripts/favorites.js b/dashboard-ui/scripts/favorites.js index 32ec402738..348560181f 100644 --- a/dashboard-ui/scripts/favorites.js +++ b/dashboard-ui/scripts/favorites.js @@ -38,7 +38,6 @@ SortBy: "SortName", SortOrder: "Ascending", Filters: "IsFavorite", - Limit: screenWidth >= 1920 ? 10 : (screenWidth >= 1440 ? 8 : 6), Recursive: true, Fields: "PrimaryImageAspectRatio,SyncInfo", CollapseBoxSetItems: false, @@ -49,8 +48,12 @@ options.ParentId = topParentId; } - if (isSingleSection) { - options.Limit = null; + if (!isSingleSection) { + options.Limit = screenWidth >= 1920 ? 10 : (screenWidth >= 1440 ? 8 : 6); + + if (enableScrollX()) { + options.Limit = 12; + } } var promise; diff --git a/dashboard-ui/scripts/globalize.js b/dashboard-ui/scripts/globalize.js index e469e5d394..f2e52fcc09 100644 --- a/dashboard-ui/scripts/globalize.js +++ b/dashboard-ui/scripts/globalize.js @@ -76,38 +76,36 @@ function getDeviceCulture() { var deferred = DeferredBuilder.Deferred(); - var culture; + if (navigator.globalization && navigator.globalization.getPreferredLanguage) { - if (navigator.globalization && navigator.globalization.getLocaleName) { + Logger.log('Calling navigator.globalization.getPreferredLanguage'); - Logger.log('Calling navigator.globalization.getLocaleName'); + navigator.globalization.getPreferredLanguage(function (locale) { - navigator.globalization.getLocaleName(function (locale) { - - culture = normalizeLocaleName(locale.value || ''); + var culture = locale.value || ''; + //if ($.browser.safari) { + culture = navigator.language || navigator.userLanguage || culture; + //} Logger.log('Device culture is ' + culture); deferred.resolveWith(null, [culture]); }, function () { - Logger.log('navigator.globalization.getLocaleName failed'); + Logger.log('navigator.globalization.getPreferredLanguage failed'); - deferred.resolveWith(null, [null]); + deferred.resolveWith(null, [navigator.language || navigator.userLanguage]); }); } else if (AppInfo.supportsUserDisplayLanguageSetting) { Logger.log('AppInfo.supportsUserDisplayLanguageSetting is true'); - culture = AppSettings.displayLanguage(); - deferred.resolveWith(null, [culture]); + deferred.resolveWith(null, [AppSettings.displayLanguage()]); } else { Logger.log('Getting culture from document'); - - culture = document.documentElement.getAttribute('data-culture'); - deferred.resolveWith(null, [culture]); + deferred.resolveWith(null, [document.documentElement.getAttribute('data-culture')]); } return deferred.promise(); @@ -122,9 +120,7 @@ getDeviceCulture().done(function (culture) { - if (!culture) { - culture = 'en-US'; - } + culture = normalizeLocaleName(culture || 'en-US'); setCulture(culture).done(function () { deferred.resolve(); diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js index 8a0696e2ee..656502a144 100644 --- a/dashboard-ui/scripts/itemdetailpage.js +++ b/dashboard-ui/scripts/itemdetailpage.js @@ -391,7 +391,12 @@ } renderThemeMedia(page, item, user); - renderCriticReviews(page, item, 1); + + if (enableScrollX()) { + renderCriticReviews(page, item); + } else { + renderCriticReviews(page, item, 1); + } } function renderDetails(page, item, context, isStatic) { @@ -1127,14 +1132,11 @@ var reviews = result.Items; - if (reviews.length) { - html += '
'; - } - for (var i = 0, length = reviews.length; i < length; i++) { var review = reviews[i]; + html += '
'; html += ''; if (review.Score != null) { @@ -1185,8 +1187,6 @@ html += ''; html += ''; - } - if (reviews.length) { html += '
'; } @@ -1196,6 +1196,12 @@ var criticReviewsContent = page.querySelector('#criticReviewsContent'); criticReviewsContent.innerHTML = html; + + if (enableScrollX()) { + criticReviewsContent.classList.add('hiddenScrollX'); + } else { + criticReviewsContent.classList.remove('hiddenScrollX'); + } } function renderThemeMedia(page, item) { @@ -1711,6 +1717,10 @@ return c.PrimaryImageTag; }); + if (!casts.length) { + casts = item.People || []; + } + for (var i = 0, length = casts.length; i < length; i++) { var cast = casts[i]; diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index e8a74c4062..ba44663bb9 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1775,7 +1775,7 @@ var showTitle = options.showTitle == 'auto' ? true : options.showTitle; var coverImage = options.coverImage; - if (options.autoThumb && item.ImageTags && item.ImageTags.Primary && item.PrimaryImageAspectRatio && item.PrimaryImageAspectRatio >= 1.5) { + if (options.autoThumb && item.ImageTags && item.ImageTags.Primary && item.PrimaryImageAspectRatio && item.PrimaryImageAspectRatio >= 1.34) { width = posterWidth; height = primaryImageAspectRatio ? Math.round(posterWidth / primaryImageAspectRatio) : null;