diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
index 5130604b62..adf3f3e138 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.1.93",
- "_release": "1.1.93",
+ "version": "1.1.94",
+ "_release": "1.1.94",
"_resolution": {
"type": "version",
- "tag": "1.1.93",
- "commit": "3d971009690236323becba5c24803780a345ea54"
+ "tag": "1.1.94",
+ "commit": "7e52c39c2c6a43b00b845509e8b227420042ce6f"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.1.5",
diff --git a/dashboard-ui/legacy/objectassign.js b/dashboard-ui/bower_components/emby-webcomponents/objectassign.js
similarity index 100%
rename from dashboard-ui/legacy/objectassign.js
rename to dashboard-ui/bower_components/emby-webcomponents/objectassign.js
diff --git a/dashboard-ui/bower_components/iron-flex-layout/.bower.json b/dashboard-ui/bower_components/iron-flex-layout/.bower.json
index c6c5c62b6b..f60160480a 100644
--- a/dashboard-ui/bower_components/iron-flex-layout/.bower.json
+++ b/dashboard-ui/bower_components/iron-flex-layout/.bower.json
@@ -36,6 +36,6 @@
"commit": "6d88f29f3a7181daa2a5c7f678de44f0a0e6a717"
},
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
- "_target": "^1.0.0",
+ "_target": "^1.3.1",
"_originalSource": "PolymerElements/iron-flex-layout"
}
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/iron-icon/.bower.json b/dashboard-ui/bower_components/iron-icon/.bower.json
index f0167baf13..9784e3a3b7 100644
--- a/dashboard-ui/bower_components/iron-icon/.bower.json
+++ b/dashboard-ui/bower_components/iron-icon/.bower.json
@@ -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.8",
"_resolution": {
"type": "version",
"tag": "v1.0.8",
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
},
- "_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"
}
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json
index 501b4d7b04..98376c9d40 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json
@@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
- "version": "1.5.4",
+ "version": "1.6.0",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
@@ -35,11 +35,11 @@
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
- "_release": "1.5.4",
+ "_release": "1.6.0",
"_resolution": {
"type": "version",
- "tag": "v1.5.4",
- "commit": "ee81b7ae2e63fea82e60df17669fb07a65046a8c"
+ "tag": "v1.6.0",
+ "commit": "5179ec9ad80a9c30b77486ffe9599828f944ab4a"
},
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
"_target": "^1.0.0",
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json
index 43a15a854d..988fce6360 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json
@@ -1,6 +1,6 @@
{
"name": "iron-overlay-behavior",
- "version": "1.5.4",
+ "version": "1.6.0",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
index 93453d247e..92ed1e052d 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
@@ -100,6 +100,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
+
Use always-on-top to keep the overlay on top of others.
+
+
+
+
+
Always on top
+
+
+
+
+
With backdrop
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+
+
+
+
An element with IronOverlayBehavior can be scrollable or contain scrollable content.
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html
index ceddfcca17..ce17424d73 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html
@@ -126,6 +126,13 @@ context. You should place this element as a child of `` whenever possible.
value: false
},
+ /**
+ * Set to true to keep overlay always on top.
+ */
+ alwaysOnTop: {
+ type: Boolean
+ },
+
/**
* Shortcut to access to the overlay manager.
* @private
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html
index 916d26d2ab..538d5b67c0 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-manager.html
@@ -85,8 +85,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_bringOverlayAtIndexToFront: function(i) {
var overlay = this._overlays[i];
var lastI = this._overlays.length - 1;
+ // Ensure always-on-top overlay stays on top.
+ if (!overlay.alwaysOnTop && this._overlays[lastI].alwaysOnTop) {
+ lastI--;
+ }
// If already the top element, return.
- if (!overlay || i === lastI) {
+ if (!overlay || i >= lastI) {
return;
}
// Update z-index to be on top.
@@ -119,6 +123,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
/**
* Tracks overlays for z-index and focus management.
+ * Ensures the last added overlay with always-on-top remains on top.
* @param {Element} overlay
*/
addOverlay: function(overlay) {
@@ -127,12 +132,28 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._bringOverlayAtIndexToFront(i);
return;
}
- var minimumZ = Math.max(this.currentOverlayZ(), this._minimumZ);
- this._overlays.push(overlay);
- var newZ = this.currentOverlayZ();
+ var insertionIndex = this._overlays.length;
+ var currentOverlay = this._overlays[insertionIndex - 1];
+ var minimumZ = Math.max(this._getZ(currentOverlay), this._minimumZ);
+ var newZ = this._getZ(overlay);
+
+ // Ensure always-on-top overlay stays on top.
+ if (currentOverlay && currentOverlay.alwaysOnTop && !overlay.alwaysOnTop) {
+ // This bumps the z-index of +2.
+ this._applyOverlayZ(currentOverlay, minimumZ);
+ insertionIndex--;
+ // Update minimumZ to match previous overlay's z-index.
+ var previousOverlay = this._overlays[insertionIndex - 1];
+ minimumZ = Math.max(this._getZ(previousOverlay), this._minimumZ);
+ }
+
+ // Update z-index and insert overlay.
if (newZ <= minimumZ) {
this._applyOverlayZ(overlay, minimumZ);
}
+ this._overlays.splice(insertionIndex, 0, overlay);
+
+ // Get focused node.
var element = this.deepActiveElement;
overlay.restoreFocusNode = this._overlayParent(element) ? null : element;
},
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html
index a702babc78..984e45387b 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html
@@ -949,6 +949,57 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, 1);
});
});
+
+ });
+
+ suite('always-on-top', function() {
+ var overlay1, overlay2;
+
+ setup(function() {
+ var f = fixture('multiple');
+ overlay1 = f[0];
+ overlay2 = f[1];
+ overlay1.alwaysOnTop = true;
+ });
+
+ test('stays on top', function(done) {
+ runAfterOpen(overlay1, function() {
+ runAfterOpen(overlay2, function() {
+ var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
+ var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
+ assert.isAbove(zIndex1, zIndex2, 'overlay1 on top');
+ assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay1, 'currentOverlay ok');
+ done();
+ });
+ });
+ });
+
+ test('stays on top also if another overlay is with-backdrop', function(done) {
+ overlay2.withBackdrop = true;
+ runAfterOpen(overlay1, function() {
+ runAfterOpen(overlay2, function() {
+ var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
+ var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
+ assert.isAbove(zIndex1, zIndex2, 'overlay1 on top');
+ assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay1, 'currentOverlay ok');
+ done();
+ });
+ });
+ });
+
+ test('last overlay with always-on-top wins', function(done) {
+ overlay2.alwaysOnTop = true;
+ runAfterOpen(overlay1, function() {
+ runAfterOpen(overlay2, function() {
+ var zIndex1 = parseInt(window.getComputedStyle(overlay1).zIndex, 10);
+ var zIndex2 = parseInt(window.getComputedStyle(overlay2).zIndex, 10);
+ assert.isAbove(zIndex2, zIndex1, 'overlay2 on top');
+ assert.equal(Polymer.IronOverlayManager.currentOverlay(), overlay2, 'currentOverlay ok');
+ done();
+ });
+ });
+ });
+
});
suite('a11y', function() {
@@ -962,7 +1013,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
assert.equal(overlay.getAttribute('aria-hidden'), 'true', 'overlay has aria-hidden="true"');
});
- })
+ });
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index 90a81372d2..31e0695f7c 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -1945,7 +1945,7 @@ var AppInfo = {};
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
define('fetch', [bowerPath + '/fetch/fetch']);
- define('objectassign', ['legacy/objectassign']);
+ define('objectassign', [embyWebComponentsBowerPath + '/objectassign']);
define('webcomponentsjs', [bowerPath + '/webcomponentsjs/webcomponents-lite.min.js']);
define('native-promise-only', [bowerPath + '/native-promise-only/lib/npo.src']);