update components

This commit is contained in:
Luke Pulverenti 2016-08-20 02:27:48 -04:00
parent 1846f1afcf
commit 965bf947c8
16 changed files with 111 additions and 63 deletions

View File

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.175",
"_release": "1.4.175",
"version": "1.4.176",
"_release": "1.4.176",
"_resolution": {
"type": "version",
"tag": "1.4.175",
"commit": "aa687c378a3252d0679dfb8b16c5e6e0e1350c7a"
"tag": "1.4.176",
"commit": "a69a071e40e18eb0f20b800f27de8f1c62c38fec"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View File

@ -182,12 +182,12 @@
height: 100%;
}
.cardImage.coveredImage, .cardImageContainer.coveredImage, .coveredImage .cardImage {
.coveredImage {
background-size: 100% 100%;
background-position: center center;
}
.coveredImage.noScale, .coveredImage.noScale .cardImage {
.coveredImage-noScale {
background-size: cover;
}

View File

@ -1034,7 +1034,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
cardImageContainerClass += ' coveredImage';
if (item.MediaType == 'Photo' || item.Type == 'PhotoAlbum' || item.Type == 'Folder') {
cardImageContainerClass += ' noScale';
cardImageContainerClass += ' coveredImage-noScale';
}
}

View File

@ -1,6 +1,7 @@
.emby-tab-button {
background: transparent;
border: 0 !important;
border: 2px solid transparent !important;
border-width: 0 0 2px 0 !important;
cursor: pointer;
outline: none !important;
width: auto;
@ -23,12 +24,13 @@
overflow: hidden;
}
.emby-tab-button:focus {
font-weight: bold !important;
}
.emby-tab-button:focus {
font-weight: bold !important;
}
.emby-tab-button-active {
color: #52B54B !important;
border-color: #52B54B !important;
}
.emby-tabs-slider {
@ -39,7 +41,7 @@
position: absolute;
left: 0;
/* Need this or it will be partially covered by the drop-shadow on android */
bottom: 1px;
bottom: 0;
height: 2px;
z-index: 1000;
background: #52B54B;

View File

@ -15,37 +15,10 @@
}
}
function getButtonSelectionBar(tabButton) {
var elem = tabButton.querySelector('.' + buttonClass + '-selection-bar');
if (!elem) {
elem = document.createElement('div');
elem.classList.add(buttonClass + '-selection-bar');
tabButton.appendChild(elem);
}
return elem;
}
function hideButtonSelectionBar(tabButton) {
var elem = getButtonSelectionBar(tabButton);
elem.classList.add('hide');
elem.classList.remove('emby-tab-button-selection-bar-active');
}
function showButtonSelectionBar(tabButton) {
var elem = getButtonSelectionBar(tabButton);
elem.classList.remove('hide');
elem.classList.add('emby-tab-button-selection-bar-active');
}
function animtateSelectionBar(bar, start, pos, duration, onFinish) {
var endTransform = pos ? ('translateX(' + pos + 'px)') : 'none';
var startTransform = start ? ('translateX(' + start + 'px)') : 'none';
var endTransform = pos ? ('translateX(' + Math.round(pos) + 'px)') : 'none';
var startTransform = start ? ('translateX(' + Math.round(start) + 'px)') : 'none';
if (!duration || !bar.animate) {
bar.style.transform = endTransform;
@ -66,16 +39,14 @@
iterations: 1,
easing: 'linear',
fill: 'forwards'
}).onFinish = onFinish;
});
// for some reason onFinish is not firing. temporary browser issue?
setTimeout(onFinish, duration);
}
function moveSelectionBar(tabs, newButton, oldButton, animate) {
if (oldButton) {
hideButtonSelectionBar(oldButton);
}
hideButtonSelectionBar(newButton);
var selectionBar = tabs.selectionBar;
if (selectionBar) {
@ -104,13 +75,14 @@
var delay = animate ? 100 : 0;
tabs.currentOffset = endPosition;
newButton.classList.add(activeButtonClass);
var onAnimationFinish = function() {
var onAnimationFinish = function () {
//if (tabs.getAttribute('data-selectionbar') != 'false') {
// showButtonSelectionBar(newButton);
//}
newButton.classList.add(activeButtonClass);
if (tabs.getAttribute('data-selectionbar') != 'false') {
showButtonSelectionBar(newButton);
}
if (selectionBar) {
selectionBar.classList.add('hide');
}

View File

@ -152,8 +152,9 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
xhr.onload = function (e) {
if (this.status < 400) {
resolve(JSON.parse(this.response));
} else {
resolve({});
}
resolve({});
};
xhr.onerror = function () {

View File

@ -0,0 +1,25 @@
if (!Array.prototype.filter) {
Array.prototype.filter = function (fun /*, thisp*/) {
"use strict";
if (this == null)
throw new TypeError();
var t = Object(this);
var len = t.length >>> 0;
if (typeof fun != "function")
throw new TypeError();
var res = [];
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in t) {
var val = t[i]; // in case fun mutates this
if (fun.call(thisp, val, i, t))
res.push(val);
}
}
return res;
};
}

View File

@ -0,0 +1,27 @@
if (!Function.prototype.bind) {
Function.prototype.bind = function (oThis) {
if (typeof this !== 'function') {
// closest thing possible to the ECMAScript 5
// internal IsCallable function
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function () { },
fBound = function () {
return fToBind.apply(this instanceof fNOP
? this
: oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
if (this.prototype) {
// Function.prototype doesn't have a prototype property
fNOP.prototype = this.prototype;
}
fBound.prototype = new fNOP();
return fBound;
};
}

View File

@ -16,7 +16,7 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
return false;
}
return true;
return browser.edge && !browser.mobile;
}
function loadView(options) {
@ -261,7 +261,7 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
selectedPageIndex = -1;
}
if (enableAnimation() && !document.documentElement.animate) {
if (enableAnimation() && !browser.animate) {
require(['webAnimations']);
}

View File

@ -32,14 +32,14 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/iron-icon",
"homepage": "https://github.com/polymerelements/iron-icon",
"_release": "1.0.10",
"_resolution": {
"type": "version",
"tag": "v1.0.10",
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
},
"_source": "git://github.com/PolymerElements/iron-icon.git",
"_source": "git://github.com/polymerelements/iron-icon.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-icon"
"_originalSource": "polymerelements/iron-icon"
}

View File

@ -263,8 +263,12 @@ globalize.translate('CancelSyncJobConfirmation');
id: 'delete'
});
} else {
var txt = listInstance.options.isLocalSync ?
globalize.translate('RemoveDownload') :
globalize.translate('ButtonCancelSyncJob');
menuItems.push({
name: globalize.translate('ButtonCancelSyncJob'),
name: globalize.translate(txt),
id: 'cancel'
});
}

View File

@ -54,6 +54,10 @@ body:not(.dashboardDocument) .mainDrawerButton {
color: #52B54B !important;
}
.emby-tab-button-active {
border-color: transparent !important;
}
.criticReviewPaperList {
background-color: #262626;
}

View File

@ -146,7 +146,7 @@
type: "Primary"
});
html += '<div class="cardImageContainer coveredImage noScale" style="background-image:url(\'' + imgUrl + '\');"></div>';
html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + '\');"></div>';
}
else {
@ -154,7 +154,7 @@
imgUrl = 'css/images/logindefault.png';
html += '<div class="cardImageContainer coveredImage noScale" style="background-image:url(\'' + imgUrl + '\');background-color:' + background + ';"></div>';
html += '<div class="cardImageContainer coveredImage coveredImage-noScale" style="background-image:url(\'' + imgUrl + '\');background-color:' + background + ';"></div>';
}
html += '</a>';

View File

@ -1430,7 +1430,11 @@ var AppInfo = {};
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
define('fetch', [bowerPath + '/fetch/fetch']);
define('objectassign', [embyWebComponentsBowerPath + '/objectassign']);
define('functionbind', [embyWebComponentsBowerPath + '/polyfills/bind']);
define('arraypolyfills', [embyWebComponentsBowerPath + '/polyfills/array']);
define('objectassign', [embyWebComponentsBowerPath + '/polyfills/objectassign']);
define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']);
define("clearButtonStyle", ['css!' + embyWebComponentsBowerPath + '/clearbutton']);
define("userdataButtons", [embyWebComponentsBowerPath + "/userdatabuttons/userdatabuttons"], returnFirstDependency);
@ -1782,7 +1786,15 @@ var AppInfo = {};
}
if (typeof Object.assign != 'function') {
deps.push('objectassign');
list.push('objectassign');
}
if (!Array.prototype.filter) {
list.push('arraypolyfills');
}
if (!Function.prototype.bind) {
list.push('functionbind');
}
require(deps, function () {

View File

@ -2315,6 +2315,7 @@
"EnablePhotosHelp": "Photos will be detected and displayed alongside other media files.",
"MakeAvailableOffline": "Make available offline",
"ConfirmRemoveDownload": "Remove download?",
"RemoveDownload": "Remove download",
"SyncToOtherDevices": "Sync to other devices",
"ManageOfflineDownloads": "Manage offline downloads",
"MessageDownloadScheduled": "Download scheduled"