webui: fix excessive registration of state change event listeners

`Facet` descendants don't have `container` attribute as opposite to
`facet.facet`. Therefore the registration will happen on every facet
visit.

Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
This commit is contained in:
Petr Vobornik 2014-05-16 18:15:37 +02:00
parent 14e2eb9171
commit c6c7dfeefb

View File

@ -323,7 +323,7 @@ define([
if (menu_item) this.menu.select(menu_item);
// show facet
if (!facet.container) {
if (!facet.container_node) {
facet.container_node = container.widget.content_node;
on(facet, 'facet-state-change', lang.hitch(this, this.on_facet_state_changed));
}