mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer
This commit is contained in:
parent
571dd964e6
commit
c526176a6a
23 changed files with 707 additions and 243 deletions
|
@ -15,6 +15,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
/** @polymerBehavior */
|
||||
Polymer.IronSelectableBehavior = {
|
||||
|
||||
/**
|
||||
* Fired when iron-selector is activated (selected or deselected).
|
||||
* It is fired before the selected items are changed.
|
||||
* Cancel the event to abort selection.
|
||||
*
|
||||
* @event iron-activate
|
||||
*
|
||||
**/
|
||||
/**
|
||||
* Fired when an item is selected
|
||||
*
|
||||
* @event iron-select
|
||||
*
|
||||
**/
|
||||
/**
|
||||
* Fired when an item is deselected
|
||||
*
|
||||
* @event iron-deselect
|
||||
*
|
||||
**/
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
|
@ -68,7 +89,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
/**
|
||||
* This is a CSS selector sting. If this is set, only items that matches the CSS selector
|
||||
* This is a CSS selector string. If this is set, only items that match the CSS selector
|
||||
* are selectable.
|
||||
*
|
||||
* @attribute selectable
|
||||
|
@ -96,18 +117,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
selectedAttribute: {
|
||||
type: String,
|
||||
value: null
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The set of excluded elements where the key is the `localName`
|
||||
* of the element that will be ignored from the item list.
|
||||
*
|
||||
* @type {object}
|
||||
* @default {template: 1}
|
||||
*/
|
||||
|
||||
excludedLocalNames: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return {
|
||||
'template': 1
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_updateSelected(attrForSelected, selected)'
|
||||
],
|
||||
|
||||
excludedLocalNames: {
|
||||
'template': 1
|
||||
},
|
||||
|
||||
created: function() {
|
||||
this._bindFilterItem = this._filterItem.bind(this);
|
||||
this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
|
||||
|
@ -186,9 +219,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
_removeListener: function(eventName) {
|
||||
// There is no unlisten yet...
|
||||
// https://github.com/Polymer/polymer/issues/1639
|
||||
//this.removeEventListener(eventName, this._bindActivateHandler);
|
||||
this.unlisten(this, eventName, '_activateHandler');
|
||||
},
|
||||
|
||||
_activateEventChanged: function(eventName, old) {
|
||||
|
@ -277,11 +308,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
_activateHandler: function(e) {
|
||||
// TODO: remove this when https://github.com/Polymer/polymer/issues/1639 is fixed so we
|
||||
// can just remove the old event listener.
|
||||
if (e.type !== this.activateEvent) {
|
||||
return;
|
||||
}
|
||||
var t = e.target;
|
||||
var items = this.items;
|
||||
while (t && t != this) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue