');
}
var cardScalableClass = options.cardLayout ? 'cardScalable visualCardBox-cardScalable' : 'cardScalable';
diff --git a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js
index 599e6e66f4..002cfc9992 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/collectioneditor/collectioneditor.js
@@ -42,9 +42,6 @@
Name: dlg.querySelector('#txtNewCollectionName').value,
IsLocked: !dlg.querySelector('#chkEnableInternetMetadata').checked,
Ids: dlg.querySelector('.fldSelectedItemIds').value || ''
-
- //ParentId: getParameterByName('parentId') || LibraryMenu.getTopParentId()
-
});
apiClient.ajax({
diff --git a/dashboard-ui/bower_components/emby-webcomponents/datetime.js b/dashboard-ui/bower_components/emby-webcomponents/datetime.js
index 8ec07af932..6c9321862f 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/datetime.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/datetime.js
@@ -110,30 +110,70 @@
return locale;
}
+ function getOptionList(options) {
+
+ var list = [];
+
+ for (var i in options) {
+ list.push({
+ name: i,
+ value: options[i]
+ });
+ }
+
+ return list;
+ }
+
function toLocaleString(date, options) {
+ options = options || {};
+
var currentLocale = getCurrentLocale();
- return currentLocale && toLocaleTimeStringSupportsLocales ?
- date.toLocaleString(currentLocale, options || {}) :
- date.toLocaleString();
+ if (currentLocale && toLocaleTimeStringSupportsLocales) {
+ return date.toLocaleString(currentLocale, options);
+ }
+
+ return date.toLocaleString();
}
function toLocaleDateString(date, options) {
+ options = options || {};
+
var currentLocale = getCurrentLocale();
- return currentLocale && toLocaleTimeStringSupportsLocales ?
- date.toLocaleDateString(currentLocale, options || {}) :
- date.toLocaleDateString();
+ if (currentLocale && toLocaleTimeStringSupportsLocales) {
+ return date.toLocaleDateString(currentLocale, options);
+ }
+
+ // This is essentially a hard-coded polyfill
+ var optionList = getOptionList(options);
+ if (optionList.length === 1 && optionList[0].name === 'weekday') {
+ var weekday = [];
+ weekday[0] = "Sun";
+ weekday[1] = "Mon";
+ weekday[2] = "Tue";
+ weekday[3] = "Wed";
+ weekday[4] = "Thu";
+ weekday[5] = "Fri";
+ weekday[6] = "Sat";
+ return weekday[date.getDay()];
+ }
+
+ return date.toLocaleDateString();
}
function toLocaleTimeString(date, options) {
+ options = options || {};
+
var currentLocale = getCurrentLocale();
- return currentLocale && toLocaleTimeStringSupportsLocales ?
- date.toLocaleTimeString(currentLocale, options || {}).toLowerCase() :
- date.toLocaleTimeString().toLowerCase();
+ if (currentLocale && toLocaleTimeStringSupportsLocales) {
+ return date.toLocaleTimeString(currentLocale, options);
+ }
+
+ return date.toLocaleTimeString();
}
function getDisplayTime(date) {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/deletehelper.js b/dashboard-ui/bower_components/emby-webcomponents/deletehelper.js
new file mode 100644
index 0000000000..6070b6054f
--- /dev/null
+++ b/dashboard-ui/bower_components/emby-webcomponents/deletehelper.js
@@ -0,0 +1,40 @@
+define(['connectionManager', 'confirm', 'embyRouter', 'globalize'], function (connectionManager, confirm, embyRouter, globalize) {
+ 'use strict';
+
+ function deleteItem(options) {
+
+ var item = options.item;
+ var itemId = item.Id;
+ var parentId = item.SeasonId || item.SeriesId || item.ParentId;
+ var serverId = item.ServerId;
+
+ var msg = globalize.translate('sharedcomponents#ConfirmDeleteItem');
+ var title = globalize.translate('sharedcomponents#HeaderDeleteItem');
+ var apiClient = connectionManager.getApiClient(item.ServerId);
+
+ return confirm({
+
+ title: title,
+ text: msg,
+ confirmText: globalize.translate('sharedcomponents#Delete'),
+ primary: 'cancel'
+
+ }).then(function () {
+
+ return apiClient.deleteItem(itemId).then(function () {
+
+ if (options.navigate) {
+ if (parentId) {
+ embyRouter.showItem(parentId, serverId);
+ } else {
+ embyRouter.goHome();
+ }
+ }
+ });
+ });
+ }
+
+ return {
+ deleteItem: deleteItem
+ };
+});
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
index d2e00e0a1b..5a4d9c2cfe 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
@@ -5,20 +5,12 @@
function enableAnimation() {
- if (browser.animate) {
- return true;
- }
-
- if (browser.edge) {
- return true;
- }
-
- // An indication of an older browser
- if (browser.noFlex) {
+ // too slow
+ if (browser.tv) {
return false;
}
- return true;
+ return browser.supportsCssAnimation();
}
function removeCenterFocus(dlg) {
@@ -246,12 +238,12 @@
if (enableAnimation()) {
var onFinish = function () {
- dom.removeEventListener(dlg, 'animationend', onFinish, {
+ dom.removeEventListener(dlg, dom.whichAnimationEvent(), onFinish, {
once: true
});
onAnimationFinish();
};
- dom.addEventListener(dlg, 'animationend', onFinish, {
+ dom.addEventListener(dlg, dom.whichAnimationEvent(), onFinish, {
once: true
});
return;
@@ -265,6 +257,7 @@
if (enableAnimation()) {
var animated = true;
+
switch (dlg.animationConfig.exit.name) {
case 'fadeout':
@@ -281,12 +274,12 @@
break;
}
var onFinish = function () {
- dom.removeEventListener(dlg, 'animationend', onFinish, {
+ dom.removeEventListener(dlg, dom.whichAnimationEvent(), onFinish, {
once: true
});
onAnimationFinish();
};
- dom.addEventListener(dlg, 'animationend', onFinish, {
+ dom.addEventListener(dlg, dom.whichAnimationEvent(), onFinish, {
once: true
});
@@ -436,6 +429,7 @@
}
if (enableAnimation()) {
+
switch (dlg.animationConfig.entry.name) {
case 'fadein':
diff --git a/dashboard-ui/bower_components/emby-webcomponents/dom.js b/dashboard-ui/bower_components/emby-webcomponents/dom.js
index d662735c23..b98d5d1daa 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/dom.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/dom.js
@@ -94,12 +94,65 @@ define([], function () {
return windowSize;
}
+ var _animationEvent;
+ function whichAnimationEvent() {
+
+ if (_animationEvent) {
+ return _animationEvent;
+ }
+
+ var t,
+ el = document.createElement("div");
+ var animations = {
+ "animation": "animationend",
+ "OAnimation": "oAnimationEnd",
+ "MozAnimation": "animationend",
+ "WebkitAnimation": "webkitAnimationEnd"
+ };
+ for (t in animations) {
+ if (el.style[t] !== undefined) {
+ _animationEvent = animations[t];
+ return animations[t];
+ }
+ }
+
+ _animationEvent = 'animationend';
+ return _animationEvent;
+ }
+
+ var _transitionEvent;
+ function whichTransitionEvent() {
+ if (_transitionEvent) {
+ return _transitionEvent;
+ }
+
+ var t,
+ el = document.createElement("div");
+ var transitions = {
+ "transition": "transitionend",
+ "OTransition": "oTransitionEnd",
+ "MozTransition": "transitionend",
+ "WebkitTransition": "webkitTransitionEnd"
+ };
+ for (t in transitions) {
+ if (el.style[t] !== undefined) {
+ _transitionEvent = transitions[t];
+ return transitions[t];
+ }
+ }
+
+ _transitionEvent = 'transitionend';
+ return _transitionEvent;
+ }
+
return {
parentWithAttribute: parentWithAttribute,
parentWithClass: parentWithClass,
parentWithTag: parentWithTag,
addEventListener: addEventListenerWithOptions,
removeEventListener: removeEventListenerWithOptions,
- getWindowSize: getWindowSize
+ getWindowSize: getWindowSize,
+ whichTransitionEvent: whichTransitionEvent,
+ whichAnimationEvent: whichAnimationEvent
};
});
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css
index 8f623792ef..e86bf08dc0 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.css
@@ -15,7 +15,7 @@
user-select: none;
cursor: pointer;
z-index: 0;
- padding: 0.7em 0.57em;
+ padding: 1em .7em;
font-weight: normal;
vertical-align: middle;
border: 0;
@@ -40,6 +40,18 @@
text-transform: uppercase;
}
+.emby-button-focusscale {
+ transition: transform 180ms ease-out !important;
+ -webkit-transform-origin: center center;
+ transform-origin: center center;
+}
+
+ .emby-button-focusscale:focus {
+ transform: scale(1.16);
+ z-index: 1;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+ }
+
.emby-button > i {
/* For non-fab buttons that have icons */
font-size: 1.36em;
@@ -50,7 +62,7 @@
.fab {
display: inline-flex;
border-radius: 50%;
- background-color: #444;
+ background-color: rgba(170,170,190, .4);
padding: .6em;
box-sizing: border-box;
align-items: center;
@@ -220,3 +232,14 @@
position: relative;
z-index: 1;
}
+
+.icon-button-focusscale {
+ transition: transform 180ms ease-out !important;
+ -webkit-transform-origin: center center;
+ transform-origin: center center;
+}
+
+ .icon-button-focusscale:focus {
+ transform: scale(1.3);
+ z-index: 1;
+ }
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.js b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.js
index 0064d772b0..e9bc5685d1 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-button/emby-button.js
@@ -1,4 +1,4 @@
-define(['browser', 'dom', 'css!./emby-button', 'registerElement'], function (browser, dom) {
+define(['browser', 'dom', 'layoutManager', 'css!./emby-button', 'registerElement'], function (browser, dom, layoutManager) {
'use strict';
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
@@ -26,7 +26,7 @@
btn.appendChild(div);
}
- div.addEventListener("animationend", function () {
+ div.addEventListener(dom.whichAnimationEvent(), function () {
div.parentNode.removeChild(div);
}, false);
}
@@ -73,10 +73,15 @@
this.classList.add('emby-button');
- if (browser.safari || browser.firefox || browser.noFlex) {
+ // Even though they support flex, it doesn't quite work with button elements
+ if (browser.firefox || browser.safari) {
this.classList.add('emby-button-noflex');
}
+ if (layoutManager.tv) {
+ this.classList.add('emby-button-focusscale');
+ }
+
if (enableAnimation()) {
dom.addEventListener(this, 'keydown', onKeyDown, {
passive: true
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-button/paper-icon-button-light.js b/dashboard-ui/bower_components/emby-webcomponents/emby-button/paper-icon-button-light.js
index ba5f5a1c2f..2204b894fb 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-button/paper-icon-button-light.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-button/paper-icon-button-light.js
@@ -1,4 +1,4 @@
-define(['browser', 'dom', 'css!./emby-button', 'registerElement'], function (browser, dom) {
+define(['browser', 'dom', 'layoutManager', 'css!./emby-button', 'registerElement'], function (browser, dom, layoutManager) {
'use strict';
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
@@ -29,7 +29,7 @@
btn.appendChild(div);
- div.addEventListener("animationend", function () {
+ div.addEventListener(dom.whichAnimationEvent(), function () {
div.parentNode.removeChild(div);
}, false);
}
@@ -61,6 +61,10 @@
this.classList.add('paper-icon-button-light');
+ if (layoutManager.tv) {
+ this.classList.add('icon-button-focusscale');
+ }
+
if (enableAnimation()) {
dom.addEventListener(this, 'keydown', onKeyDown, {
passive: true
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-checkbox/emby-checkbox.css b/dashboard-ui/bower_components/emby-webcomponents/emby-checkbox/emby-checkbox.css
index b70c7c7962..03a6ea757d 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-checkbox/emby-checkbox.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-checkbox/emby-checkbox.css
@@ -2,7 +2,7 @@
position: relative;
z-index: 1;
vertical-align: middle;
- display: inline-block;
+ display: inline-flex;
box-sizing: border-box;
width: 100%;
margin: 0;
@@ -18,18 +18,7 @@
.checkboxContainer {
margin-bottom: 1.8em;
- display: block;
-}
-
-@supports (display: flex) {
-
- .mdl-checkbox {
- display: inline-flex;
- }
-
- .checkboxContainer {
display: flex;
- }
}
.checkboxContainer-withDescription {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js
index cef357c8f3..313d93fb7f 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-itemscontainer/emby-itemscontainer.js
@@ -119,6 +119,8 @@
var serverId = el.getAttribute('data-serverid');
var apiClient = connectionManager.getApiClient(serverId);
+ newIndex = Math.max(0, newIndex - 1);
+
apiClient.ajax({
url: apiClient.getUrl('Playlists/' + playlistId + '/Items/' + itemId + '/Move/' + newIndex),
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css
index 613d2b8316..acb1c5c265 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.css
@@ -2,7 +2,6 @@
display: block;
margin: 0;
margin-bottom: 0 !important;
- background: none;
border: 1px solid #383838;
border-width: 0 0 1px 0;
/* Prefixed box-sizing rules necessary for older browsers */
@@ -15,17 +14,21 @@
/* General select styles: change as needed */
font-family: inherit;
font-weight: inherit;
- color: inherit;
padding: .35em .8em .3em 0;
cursor: pointer;
outline: none !important;
width: 100%;
+}
+
+.emby-select-withoptioncolor {
+ color: inherit;
+ background: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
- .emby-select option {
+ .emby-select-withoptioncolor > option {
color: initial;
}
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js
index 63dc61fd05..6dc0713b5f 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-select/emby-select.js
@@ -118,6 +118,10 @@
inputId++;
}
+ if (!browser.firefox) {
+ this.classList.add('emby-select-withoptioncolor');
+ }
+
this.addEventListener('mousedown', onMouseDown);
this.addEventListener('keydown', onKeyDown);
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.css b/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.css
index c3fa8e8b4b..da14f584aa 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.css
@@ -16,7 +16,7 @@ _:-ms-input-placeholder, :root .mdl-slider {
-ms-user-select: none;
user-select: none;
outline: 0;
- padding: 0;
+ padding: 1.5em 0;
color: #52B54B;
-webkit-align-self: center;
-ms-flex-item-align: center;
@@ -24,6 +24,9 @@ _:-ms-input-placeholder, :root .mdl-slider {
z-index: 1;
cursor: pointer;
margin: 0;
+ /* Disable webkit tap highlighting */
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+ display: block;
/**************************** Tracks ****************************/
/**************************** Thumbs ****************************/
/**************************** 0-value ****************************/
@@ -77,83 +80,85 @@ _:-ms-input-placeholder, :root .mdl-slider {
border-radius: 50%;
background: #52B54B;
border: none;
- transition: border 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), border 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
- transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), border 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
- .mdl-slider::-moz-range-thumb {
- -moz-appearance: none;
- width: 1em;
- height: 1em;
- box-sizing: border-box;
- border-radius: 50%;
- background-image: none;
- background: #52B54B;
- border: none;
- }
+.slider-no-webkit-thumb::-webkit-slider-thumb {
+ opacity: 0 !important;
+}
- .mdl-slider:active::-webkit-slider-thumb {
- background-image: none;
- background: #52B54B;
- -webkit-transform: scale(1.5);
- transform: scale(1.5);
- }
+.mdl-slider::-moz-range-thumb {
+ -moz-appearance: none;
+ width: 1em;
+ height: 1em;
+ box-sizing: border-box;
+ border-radius: 50%;
+ background-image: none;
+ background: #52B54B;
+ border: none;
+}
- .mdl-slider:active::-moz-range-thumb {
- background-image: none;
- background: #52B54B;
- transform: scale(1.5);
- }
+.mdl-slider:active::-webkit-slider-thumb {
+ background-image: none;
+ background: #52B54B;
+ -webkit-transform: scale(1.5);
+ transform: scale(1.5);
+}
- .mdl-slider:focus::-webkit-slider-thumb {
- box-shadow: 0 0 0 10px rgba(82, 181, 75, 0.26);
- }
+.mdl-slider:active::-moz-range-thumb {
+ background-image: none;
+ background: #52B54B;
+ transform: scale(1.5);
+}
- .mdl-slider:focus::-moz-range-thumb {
- box-shadow: 0 0 0 10px rgba(82, 181, 75, 0.26);
- }
+.mdl-slider:focus::-webkit-slider-thumb {
+ box-shadow: 0 0 0 10px rgba(82, 181, 75, 0.26);
+}
- .mdl-slider::-ms-thumb {
- width: 16px;
- height: 16px;
- border: none;
- border-radius: 50%;
- background: #52B54B;
- }
+.mdl-slider:focus::-moz-range-thumb {
+ box-shadow: 0 0 0 10px rgba(82, 181, 75, 0.26);
+}
- .mdl-slider[disabled]::-ms-thumb {
- background: gray;
- }
+.mdl-slider::-ms-thumb {
+ width: 16px;
+ height: 16px;
+ border: none;
+ border-radius: 50%;
+ background: #52B54B;
+}
- .mdl-slider:disabled:focus::-webkit-slider-thumb, .mdl-slider:disabled:active::-webkit-slider-thumb, .mdl-slider:disabled::-webkit-slider-thumb {
- -webkit-transform: scale(0.667);
- transform: scale(0.667);
- background: rgba(0,0,0, 0.26);
- }
+.mdl-slider[disabled]::-ms-thumb {
+ background: gray;
+}
- .mdl-slider:disabled:focus::-moz-range-thumb, .mdl-slider:disabled:active::-moz-range-thumb, .mdl-slider:disabled::-moz-range-thumb {
- transform: scale(0.667);
- background: rgba(0,0,0, 0.26);
- }
+.mdl-slider:disabled:focus::-webkit-slider-thumb, .mdl-slider:disabled:active::-webkit-slider-thumb, .mdl-slider:disabled::-webkit-slider-thumb {
+ -webkit-transform: scale(0.667);
+ transform: scale(0.667);
+ background: rgba(0,0,0, 0.26);
+}
- .mdl-slider:disabled + .mdl-slider__background-flex > .mdl-slider__background-lower {
- background-color: #444;
- left: -6px;
- }
+.mdl-slider:disabled:focus::-moz-range-thumb, .mdl-slider:disabled:active::-moz-range-thumb, .mdl-slider:disabled::-moz-range-thumb {
+ transform: scale(0.667);
+ background: rgba(0,0,0, 0.26);
+}
- .mdl-slider:disabled + .mdl-slider__background-flex > .mdl-slider__background-upper {
- left: 6px;
- }
+.mdl-slider:disabled + .mdl-slider__background-flex > .mdl-slider__background-lower {
+ background-color: #444;
+ left: -6px;
+}
- .mdl-slider:disabled::-ms-fill-lower {
- margin-right: 6px;
- background: linear-gradient(to right, transparent, transparent 25px, rgba(30,30,30, 0.7) 25px, rgba(30,30,30, 0.7) 0);
- }
+.mdl-slider:disabled + .mdl-slider__background-flex > .mdl-slider__background-upper {
+ left: 6px;
+}
- .mdl-slider:disabled::-ms-fill-upper {
- margin-left: 6px;
- }
+.mdl-slider:disabled::-ms-fill-lower {
+ margin-right: 6px;
+ background: linear-gradient(to right, transparent, transparent 25px, rgba(30,30,30, 0.7) 25px, rgba(30,30,30, 0.7) 0);
+}
+
+.mdl-slider:disabled::-ms-fill-upper {
+ margin-left: 6px;
+}
.mdl-slider__ie-container {
height: 18px;
@@ -224,3 +229,7 @@ _:-ms-input-placeholder, :root .mdl-slider {
align-items: center;
justify-content: center;
}
+
+.sliderBubbleText {
+ margin: 0;
+}
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.js b/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.js
index 1c222c1c9b..831a62d6f4 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-slider/emby-slider.js
@@ -1,4 +1,4 @@
-define(['browser', 'css!./emby-slider', 'registerElement', 'emby-input'], function (browser) {
+define(['browser', 'dom', 'css!./emby-slider', 'registerElement', 'emby-input'], function (browser, dom) {
'use strict';
var EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
@@ -23,20 +23,27 @@
if (backgroundLower) {
var fraction = (value - range.min) / (range.max - range.min);
+ if (browser.noFlex) {
+ backgroundLower.style['-webkit-flex'] = fraction;
+ backgroundUpper.style['-webkit-flex'] = 1 - fraction;
+ backgroundLower.style['-webkit-box-flex'] = fraction;
+ backgroundUpper.style['-webkit-box-flex'] = 1 - fraction;
+ }
+
backgroundLower.style.flex = fraction;
backgroundUpper.style.flex = 1 - fraction;
}
});
}
- function updateBubble(range, value, bubble) {
+ function updateBubble(range, value, bubble, bubbleText) {
bubble.style.left = (value - 1) + '%';
if (range.getBubbleText) {
value = range.getBubbleText(value);
}
- bubble.innerHTML = value;
+ bubbleText.innerHTML = value;
}
EmbySliderPrototype.attachedCallback = function () {
@@ -50,6 +57,10 @@
this.classList.add('mdl-slider');
this.classList.add('mdl-js-slider');
+ if (browser.noFlex) {
+ this.classList.add('slider-no-webkit-thumb');
+ }
+
var containerElement = this.parentNode;
containerElement.classList.add('mdl-slider__container');
@@ -59,42 +70,70 @@
htmlToInsert += '
';
}
- htmlToInsert += '
';
+ htmlToInsert += '
';
containerElement.insertAdjacentHTML('beforeend', htmlToInsert);
var backgroundLower = containerElement.querySelector('.mdl-slider__background-lower');
var backgroundUpper = containerElement.querySelector('.mdl-slider__background-upper');
var sliderBubble = containerElement.querySelector('.sliderBubble');
+ var sliderBubbleText = containerElement.querySelector('.sliderBubbleText');
var hasHideClass = sliderBubble.classList.contains('hide');
- this.addEventListener('input', function (e) {
+ dom.addEventListener(this, 'input', function (e) {
this.dragging = true;
- });
- this.addEventListener('change', function () {
- this.dragging = false;
- updateValues(this, backgroundLower, backgroundUpper);
- });
- this.addEventListener('mousemove', function (e) {
-
- var rect = this.getBoundingClientRect();
- var clientX = e.clientX;
- var bubbleValue = (clientX - rect.left) / rect.width;
- bubbleValue *= 100;
- updateBubble(this, Math.round(bubbleValue), sliderBubble);
+ updateBubble(this, this.value, sliderBubble, sliderBubbleText);
if (hasHideClass) {
sliderBubble.classList.remove('hide');
hasHideClass = false;
}
+ }, {
+ passive: true
});
- this.addEventListener('mouseleave', function () {
+
+ dom.addEventListener(this, 'change', function () {
+ this.dragging = false;
+ updateValues(this, backgroundLower, backgroundUpper);
+
sliderBubble.classList.add('hide');
hasHideClass = true;
+
+ }, {
+ passive: true
});
+ // In firefox this feature disrupts the ability to move the slider
+ if (!browser.firefox) {
+ dom.addEventListener(this, 'mousemove', function (e) {
+
+ if (!this.dragging) {
+ var rect = this.getBoundingClientRect();
+ var clientX = e.clientX;
+ var bubbleValue = (clientX - rect.left) / rect.width;
+ bubbleValue *= 100;
+ updateBubble(this, Math.round(bubbleValue), sliderBubble, sliderBubbleText);
+
+ if (hasHideClass) {
+ sliderBubble.classList.remove('hide');
+ hasHideClass = false;
+ }
+ }
+
+ }, {
+ passive: true
+ });
+
+ dom.addEventListener(this, 'mouseleave', function () {
+ sliderBubble.classList.add('hide');
+ hasHideClass = true;
+ }, {
+ passive: true
+ });
+ }
+
if (!supportsNativeProgressStyle) {
if (supportsValueSetOverride) {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.css b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.css
index db3e6ff57b..e89f0a0f5d 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.css
@@ -8,7 +8,7 @@
width: auto;
font-family: inherit;
font-size: inherit;
- color: #aaa !important;
+ color: #aaa;
display: inline-block;
vertical-align: middle;
flex-shrink: 0;
@@ -17,7 +17,7 @@
transition: none !important;
position: relative;
text-transform: uppercase;
- font-weight: bold !important;
+ font-weight: bold;
height: auto;
min-width: initial;
line-height: initial;
@@ -26,11 +26,11 @@
}
.emby-tab-button:focus {
- font-weight: bold !important;
+ font-weight: bold;
}
.emby-tab-button-active {
- color: #52B54B !important;
+ color: #52B54B;
border-color: #52B54B;
}
diff --git a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js
index 6b6031b606..b1a3b5fc88 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/emby-tabs/emby-tabs.js
@@ -1,4 +1,4 @@
-define(['dom', 'scroller', 'browser', 'registerElement', 'css!./emby-tabs', 'scrollStyles'], function (dom, scroller, browser) {
+define(['dom', 'scroller', 'browser', 'layoutManager', 'focusManager', 'registerElement', 'css!./emby-tabs', 'scrollStyles'], function (dom, scroller, browser, layoutManager, focusManager) {
'use strict';
var EmbyTabs = Object.create(HTMLDivElement.prototype);
@@ -97,6 +97,23 @@
}
}
+ function getFocusCallback(tabs, e) {
+ return function () {
+ onClick.call(tabs, e);
+ };
+ }
+
+ function onFocus(e) {
+
+ if (layoutManager.tv) {
+
+ if (this.focusTimeout) {
+ clearTimeout(this.focusTimeout);
+ }
+ this.focusTimeout = setTimeout(getFocusCallback(this, e), 700);
+ }
+ }
+
function onClick(e) {
var tabs = this;
@@ -204,14 +221,37 @@
return;
}
this.classList.add('emby-tabs');
+ this.classList.add('focusable');
dom.addEventListener(this, 'click', onClick, {
passive: true
});
+ dom.addEventListener(this, 'focus', onFocus, {
+ passive: true,
+ capture: true
+ });
initSelectionBar(this);
};
+ EmbyTabs.focus = function () {
+
+ var selected = this.querySelector('.' + activeButtonClass);
+
+ if (selected) {
+ focusManager.focus(selected);
+ } else {
+ focusManager.autoFocus(this);
+ }
+ };
+
+ EmbyTabs.refresh = function () {
+
+ if (this.scroller) {
+ this.scroller.reload();
+ }
+ };
+
EmbyTabs.attachedCallback = function () {
initScroller(this);
@@ -236,6 +276,10 @@
dom.removeEventListener(this, 'click', onClick, {
passive: true
});
+ dom.removeEventListener(this, 'focus', onFocus, {
+ passive: true,
+ capture: true
+ });
this.selectionBar = null;
};
diff --git a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
index c7234809d6..4165f46576 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
@@ -304,10 +304,12 @@ define(['dom'], function (dom) {
var nearestElement = nearest[0].node;
// See if there's a focusable container, and if so, send the focus command to that
- var nearestElementFocusableParent = dom.parentWithClass(nearestElement, 'focusable');
- if (nearestElementFocusableParent && nearestElementFocusableParent !== nearestElement && activeElement) {
- if (dom.parentWithClass(activeElement, 'focusable') !== nearestElementFocusableParent) {
- nearestElement = nearestElementFocusableParent;
+ if (activeElement) {
+ var nearestElementFocusableParent = dom.parentWithClass(nearestElement, 'focusable');
+ if (nearestElementFocusableParent && nearestElementFocusableParent !== nearestElement) {
+ if (focusableContainer !== nearestElementFocusableParent) {
+ nearestElement = nearestElementFocusableParent;
+ }
}
}
focus(nearestElement);
diff --git a/dashboard-ui/bower_components/emby-webcomponents/formdialog.css b/dashboard-ui/bower_components/emby-webcomponents/formdialog.css
index 7986626530..765a3d12fe 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/formdialog.css
+++ b/dashboard-ui/bower_components/emby-webcomponents/formdialog.css
@@ -51,7 +51,8 @@
bottom: 0;
left: 0;
right: 0;
- display: block;
+ display: flex;
+ position: absolute;
padding: 1.25em 1em;
/* Without this emby-checkbox is able to appear on top */
z-index: 1;
@@ -60,16 +61,9 @@
flex-wrap: wrap;
}
-@supports (display: flex) {
-
- .formDialogFooter {
- display: flex;
- position: absolute;
- }
-}
-
.formDialogFooter-flex {
position: static;
+ width: 100%;
}
.formDialogFooterItem {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/globalize.js b/dashboard-ui/bower_components/emby-webcomponents/globalize.js
index 74e5e47660..ae751fe1fb 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/globalize.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/globalize.js
@@ -185,7 +185,13 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
function translateKeyFromModule(key, module) {
- return getDictionary(module)[key] || key;
+ var dictionary = getDictionary(module);
+
+ if (!dictionary) {
+ return key;
+ }
+
+ return dictionary[key] || key;
}
function replaceAll(str, find, replace) {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js
deleted file mode 100644
index 6cdf23599d..0000000000
--- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.js
+++ /dev/null
@@ -1,106 +0,0 @@
-define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
- 'use strict';
-
- function save(context, options) {
-
- var categories = [];
-
- var chkCategorys = context.querySelectorAll('.chkCategory');
- for (var i = 0, length = chkCategorys.length; i < length; i++) {
-
- var type = chkCategorys[i].getAttribute('data-type');
-
- if (chkCategorys[i].checked) {
- categories.push(type);
- }
- }
-
- if (categories.length >= 4) {
- categories.push('series');
- }
-
- // differentiate between none and all
- categories.push('all');
- options.categories = categories;
- }
-
- function load(context, options) {
-
- var selectedCategories = options.categories || [];
-
- var chkCategorys = context.querySelectorAll('.chkCategory');
- for (var i = 0, length = chkCategorys.length; i < length; i++) {
-
- var type = chkCategorys[i].getAttribute('data-type');
-
- chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) !== -1;
- }
- }
-
- function showEditor(options) {
-
- return new Promise(function (resolve, reject) {
-
- var settingsChanged = false;
-
- require(['text!./guide-categories.template.html'], function (template) {
-
- var dialogOptions = {
- removeOnClose: true,
- scrollY: false
- };
-
- if (layoutManager.tv) {
- dialogOptions.size = 'fullscreen';
- } else {
- dialogOptions.size = 'small';
- }
-
- var dlg = dialogHelper.createDialog(dialogOptions);
-
- dlg.classList.add('formDialog');
-
- var html = '';
-
- html += globalize.translateDocument(template, 'sharedcomponents');
-
- dlg.innerHTML = html;
-
- dlg.addEventListener('change', function () {
-
- settingsChanged = true;
- });
-
- dlg.addEventListener('close', function () {
-
- if (layoutManager.tv) {
- scrollHelper.centerFocus.off(dlg.querySelector('.formDialogContent'), false);
- }
-
- save(dlg, options);
-
- if (settingsChanged) {
- resolve(options);
- } else {
- reject();
- }
- });
-
- dlg.querySelector('.btnCancel').addEventListener('click', function () {
- dialogHelper.close(dlg);
- });
-
- if (layoutManager.tv) {
- scrollHelper.centerFocus.on(dlg.querySelector('.formDialogContent'), false);
- }
-
- load(dlg, options);
- dialogHelper.open(dlg);
- });
- });
- }
-
- return {
- show: showEditor
- };
-});
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html
deleted file mode 100644
index 37788eabdb..0000000000
--- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-categories.template.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js
index a9453cee36..e95d750c9a 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.js
@@ -1,6 +1,42 @@
define(['dialogHelper', 'globalize', 'userSettings', 'layoutManager', 'connectionManager', 'require', 'loading', 'scrollHelper', 'emby-checkbox', 'emby-radio', 'css!./../formdialog', 'material-icons'], function (dialogHelper, globalize, userSettings, layoutManager, connectionManager, require, loading, scrollHelper) {
'use strict';
+ function saveCategories(context, options) {
+
+ var categories = [];
+
+ var chkCategorys = context.querySelectorAll('.chkCategory');
+ for (var i = 0, length = chkCategorys.length; i < length; i++) {
+
+ var type = chkCategorys[i].getAttribute('data-type');
+
+ if (chkCategorys[i].checked) {
+ categories.push(type);
+ }
+ }
+
+ if (categories.length >= 4) {
+ categories.push('series');
+ }
+
+ // differentiate between none and all
+ categories.push('all');
+ options.categories = categories;
+ }
+
+ function loadCategories(context, options) {
+
+ var selectedCategories = options.categories || [];
+
+ var chkCategorys = context.querySelectorAll('.chkCategory');
+ for (var i = 0, length = chkCategorys.length; i < length; i++) {
+
+ var type = chkCategorys[i].getAttribute('data-type');
+
+ chkCategorys[i].checked = !selectedCategories.length || selectedCategories.indexOf(type) !== -1;
+ }
+ }
+
function save(context) {
var i, length;
@@ -65,7 +101,7 @@
}
}
- function showEditor() {
+ function showEditor(options) {
return new Promise(function (resolve, reject) {
@@ -106,6 +142,7 @@
}
save(dlg);
+ saveCategories(dlg, options);
if (settingsChanged) {
resolve();
@@ -123,6 +160,7 @@
}
load(dlg);
+ loadCategories(dlg, options);
dialogHelper.open(dlg);
});
});
diff --git a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html
index 2fd24e7857..d3395992d4 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html
+++ b/dashboard-ui/bower_components/emby-webcomponents/guide/guide-settings.template.html
@@ -40,8 +40,29 @@