1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

Conflicts:
	MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/.bower.json
This commit is contained in:
Luke Pulverenti 2016-01-29 21:43:11 -05:00
parent d3f40bd6d9
commit 0c696294ae
42 changed files with 1514 additions and 361 deletions

View file

@ -113,25 +113,13 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
},
attached: function() {
this._observer = this._observe(this);
// this._observer is used by iron-overlay-behavior
this._ariaObserver = Polymer.dom(this).observeNodes(this._updateAriaLabelledBy);
this._updateAriaLabelledBy();
},
detached: function() {
if (this._observer) {
this._observer.disconnect();
}
},
_observe: function(node) {
var observer = new MutationObserver(function() {
this._updateAriaLabelledBy();
}.bind(this));
observer.observe(node, {
childList: true,
subtree: true
});
return observer;
Polymer.dom(this).unobserveNodes(this._ariaObserver);
},
_modalChanged: function() {
@ -175,57 +163,52 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
},
_onDialogClick: function(event) {
var target = event.target;
var target = Polymer.dom(event).rootTarget;
while (target && target !== this) {
if (target.hasAttribute) {
if (target.hasAttribute('dialog-dismiss')) {
this._updateClosingReasonConfirmed(false);
this.close();
event.stopPropagation();
break;
} else if (target.hasAttribute('dialog-confirm')) {
this._updateClosingReasonConfirmed(true);
this.close();
event.stopPropagation();
break;
}
}
target = target.parentNode;
target = Polymer.dom(target).parentNode;
}
},
_onIronOverlayOpened: function() {
if (this.modal) {
document.body.addEventListener('focus', this._boundOnFocus, true);
this.backdropElement.addEventListener('click', this._boundOnBackdropClick);
document.body.addEventListener('click', this._boundOnBackdropClick, true);
}
},
_onIronOverlayClosed: function() {
this._lastFocusedElement = null;
document.body.removeEventListener('focus', this._boundOnFocus, true);
this.backdropElement.removeEventListener('click', this._boundOnBackdropClick);
document.body.removeEventListener('click', this._boundOnBackdropClick, true);
},
_onFocus: function(event) {
if (this.modal) {
var target = event.target;
while (target && target !== this && target !== document.body) {
target = target.parentNode;
}
if (target) {
if (target === document.body) {
if (this._lastFocusedElement) {
this._lastFocusedElement.focus();
} else {
this._focusNode.focus();
}
} else {
this._lastFocusedElement = event.target;
}
if (this.modal && this._manager.currentOverlay() === this) {
if (Polymer.dom(event).path.indexOf(this) !== -1) {
this._lastFocusedElement = event.target;
} else if (this._lastFocusedElement) {
this._lastFocusedElement.focus();
} else {
this._focusNode.focus();
}
}
},
_onBackdropClick: function() {
if (this.modal) {
_onBackdropClick: function(event) {
if (this.modal && this._manager.currentOverlay() === this && Polymer.dom(event).path.indexOf(this) === -1) {
if (this._lastFocusedElement) {
this._lastFocusedElement.focus();
} else {