diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index ade6bfe7cf..3bcaf3d510 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.3.27", - "_release": "1.3.27", + "version": "1.3.30", + "_release": "1.3.30", "_resolution": { "type": "version", - "tag": "1.3.27", - "commit": "d50eb817e00a23afb8fd5c5fe5a08745de291951" + "tag": "1.3.30", + "commit": "0cce51a6d5a1ab91c305ba22a211ee87fdf1bea0" }, "_source": "https://github.com/MediaBrowser/emby-webcomponents.git", "_target": "^1.2.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js index 055db22dc3..6bf5e4a1c9 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js +++ b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js @@ -305,14 +305,8 @@ define([], function () { return intersectsInternal(a1, a2, b1, b2) || intersectsInternal(b1, b2, a1, a2); } - var enableDebugInfo = false; - function getNearestElements(elementInfos, options, direction) { - if (enableDebugInfo) { - removeAll(); - } - // Get elements and work out x/y points var cache = [], point1x = parseFloat(options.left) || 0, @@ -379,10 +373,6 @@ define([], function () { break; } - if (enableDebugInfo) { - addDebugInfo(elem, distX, distY); - } - var distT = Math.sqrt(distX * distX + distY * distY); var distT2 = Math.sqrt(distX2 * distX2 + distY2 * distY2); @@ -405,36 +395,6 @@ define([], function () { return cache; } - function addDebugInfo(elem, distX, distY) { - - var div = elem.querySelector('focusInfo'); - - if (!div) { - div = document.createElement('div'); - div.classList.add('focusInfo'); - elem.appendChild(div); - - if (getComputedStyle(elem, null).getPropertyValue('position') == 'static') { - elem.style.position = 'relative'; - } - div.style.position = 'absolute'; - div.style.left = '0'; - div.style.top = '0'; - div.style.color = 'white'; - div.style.backgroundColor = 'red'; - div.style.padding = '2px'; - } - - div.innerHTML = Math.round(distX) + ',' + Math.round(distY); - } - - function removeAll() { - var elems = document.querySelectorAll('.focusInfo'); - for (var i = 0, length = elems.length; i < length; i++) { - elems[i].parentNode.removeChild(elems[i]); - } - } - function sortNodesX(a, b) { var result = a.distX - b.distX; diff --git a/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js b/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js index ac70660538..f970206452 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js +++ b/dashboard-ui/bower_components/emby-webcomponents/images/imagehelper.js @@ -2,6 +2,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio var thresholdX; var thresholdY; + var windowSize; function resetThresholds() { @@ -15,25 +16,36 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio thresholdX = x; thresholdY = y; + resetWindowSize(); } - resetThresholds(); - window.addEventListener("orientationchange", resetThresholds); + window.addEventListener('resize', resetThresholds); events.on(layoutManager, 'modechange', resetThresholds); var wheelEvent = (document.implementation.hasFeature('Event.wheel', '3.0') ? 'wheel' : 'mousewheel'); - function isVisible(elem, windowSize) { + function resetWindowSize() { + windowSize = { + innerHeight: window.innerHeight, + innerWidth: window.innerWidth + }; + } + resetThresholds(); + + function isVisible(elem) { return visibleinviewport(elem, true, thresholdX, thresholdY, windowSize); } var self = {}; - function fillImage(elem) { - var source = elem.getAttribute('data-src'); + function fillImage(elem, source, enableEffects) { + + if (!source) { + source = elem.getAttribute('data-src'); + } if (source) { - if (self.enableFade) { + if (self.enableFade && enableEffects !== false) { imageFetcher.loadImage(elem, source).then(fadeIn); } else { imageFetcher.loadImage(elem, source); @@ -44,10 +56,6 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio function fadeIn(elem) { - if (elem.classList.contains('noFade')) { - return; - } - var keyframes = [ { opacity: '0', offset: 0 }, { opacity: '1', offset: 1 }]; @@ -93,11 +101,6 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio var anyFound = false; var out = false; - var windowSize = { - innerHeight: window.innerHeight, - innerWidth: window.innerWidth - }; - // TODO: This out construct assumes left to right, top to bottom for (var i = 0, length = images.length; i < length; i++) { @@ -106,7 +109,7 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio return; } var img = images[i]; - if (!out && isVisible(img, windowSize)) { + if (!out && isVisible(img)) { anyFound = true; fillImage(img); } else { @@ -116,6 +119,10 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio } remaining.push(img); } + + if (out) { + return; + } } images = remaining; @@ -157,29 +164,11 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio unveil(); } - function fillImages(elems) { - - for (var i = 0, length = elems.length; i < length; i++) { - var elem = elems[0]; - var source = elem.getAttribute('data-src'); - if (source) { - ImageStore.setImageInto(elem, source); - elem.setAttribute("data-src", ''); - } - } - } - function lazyChildren(elem) { unveilElements(elem.getElementsByClassName('lazy')); } - function lazyImage(elem, url) { - - elem.setAttribute('data-src', url); - fillImages([elem]); - } - function getPrimaryImageAspectRatio(items) { var values = []; @@ -245,14 +234,8 @@ define(['visibleinviewport', 'imageFetcher', 'layoutManager', 'events'], functio } } - function lazyImage(elem, url) { - - elem.setAttribute('data-src', url); - fillImage(elem); - } - self.fillImages = fillImages; - self.lazyImage = lazyImage; + self.lazyImage = fillImage; self.lazyChildren = lazyChildren; self.getPrimaryImageAspectRatio = getPrimaryImageAspectRatio; diff --git a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js index f7bdc50b3a..a39bc0fa7e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js +++ b/dashboard-ui/bower_components/emby-webcomponents/loading/loading-lite.js @@ -1,12 +1,16 @@ define(['MaterialSpinner', 'css!./loading'], function () { + var loadingElem; + return { show: function () { - var elem = document.querySelector('.docspinner'); + var elem = loadingElem; if (!elem) { elem = document.createElement("div"); + loadingElem = elem; + elem.classList.add('docspinner'); elem.classList.add('mdl-spinner'); elem.classList.add('mdl-js-spinner'); @@ -19,7 +23,7 @@ define(['MaterialSpinner', 'css!./loading'], function () { elem.classList.remove('loadingHide'); }, hide: function () { - var elem = document.querySelector('.docspinner'); + var elem = loadingElem; if (elem) { diff --git a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js index 3cebeefea5..9d3172794f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js +++ b/dashboard-ui/bower_components/emby-webcomponents/mediainfo/mediainfo.js @@ -360,9 +360,11 @@ define(['datetime', 'globalize', 'embyRouter', 'html!./../icons/mediainfo.html', function afterFill(elem, item, options) { - var endsAtElem = elem.querySelector('.endsAt'); - if (endsAtElem) { - dynamicEndTime(endsAtElem, item); + if (options.endsAt !== false) { + var endsAtElem = elem.querySelector('.endsAt'); + if (endsAtElem) { + dynamicEndTime(endsAtElem, item); + } } var lnkChannel = elem.querySelector('.lnkChannel'); diff --git a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js index acbd4b581c..782b3fbd8f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js +++ b/dashboard-ui/bower_components/emby-webcomponents/recordingcreator/recordingcreator.js @@ -388,7 +388,7 @@ if (recordingCreated) { require(['toast'], function (toast) { - toast(globalize.translate('RecordingScheduled')); + toast(globalize.translate('sharedcomponents#RecordingScheduled')); }); resolve(); } else { diff --git a/dashboard-ui/bower_components/emby-webcomponents/viewmanager/viewcontainer-lite.js b/dashboard-ui/bower_components/emby-webcomponents/viewmanager/viewcontainer-lite.js index a3d1ffe2d4..eddac1d54f 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/viewmanager/viewcontainer-lite.js +++ b/dashboard-ui/bower_components/emby-webcomponents/viewmanager/viewcontainer-lite.js @@ -4,6 +4,7 @@ define(['browser'], function (browser) { var pageContainerCount = allPages.length; var animationDuration = 500; var allowAnimation = true; + var selectedPageIndex = -1; function enableAnimation() { @@ -33,9 +34,13 @@ define(['browser'], function (browser) { pageIndex = 0; } - var html = '