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

update collection menus

This commit is contained in:
Luke Pulverenti 2015-10-07 17:42:29 -04:00
parent 65442321a0
commit 8119b930e4
17 changed files with 183 additions and 52 deletions

View file

@ -128,6 +128,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
created: function() {
this._bindFilterItem = this._filterItem.bind(this);
this._selection = new Polymer.IronSelection(this._applySelection.bind(this));
// TODO(cdata): When polymer/polymer#2535 lands, we do not need to do this
// book keeping anymore:
this.__listeningForActivate = false;
},
attached: function() {
@ -136,6 +139,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
if (!this.selectedItem && this.selected) {
this._updateSelected(this.attrForSelected,this.selected)
}
this._addListener(this.activateEvent);
},
detached: function() {
@ -202,11 +206,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
},
_addListener: function(eventName) {
if (!this.isAttached || this.__listeningForActivate) {
return;
}
this.__listeningForActivate = true;
this.listen(this, eventName, '_activateHandler');
},
_removeListener: function(eventName) {
this.unlisten(this, eventName, '_activateHandler');
this.__listeningForActivate = false;
},
_activateEventChanged: function(eventName, old) {