fix recording icons

This commit is contained in:
Luke Pulverenti 2015-11-13 23:19:05 -05:00
parent a919223fb2
commit 663412b891
14 changed files with 100 additions and 60 deletions

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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 = {

View File

@ -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;
}

View File

@ -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;
}

View File

@ -8,7 +8,7 @@
<div data-role="content">
<div class="sections"></div>
<div class="sections favoriteSections"></div>
</div>
</div>
</body>

View File

@ -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) {

View File

@ -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;

View File

@ -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();

View File

@ -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 += '<div class="paperList">';
}
for (var i = 0, length = reviews.length; i < length; i++) {
var review = reviews[i];
html += '<div class="paperList">';
html += '<paper-icon-item style="padding-top:.5em;padding-bottom:.5em;">';
if (review.Score != null) {
@ -1185,8 +1187,6 @@
html += '</paper-item-body>';
html += '</paper-icon-item>';
}
if (reviews.length) {
html += '</div>';
}
@ -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];

View File

@ -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;