From 522bbfb716568cc30bf0baaa05aa73194e44d1fe Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 28 Mar 2015 13:41:07 -0700 Subject: [PATCH] Expose to more info content if dialog is open --- .../polymer/dialogs/more-info-dialog.html | 18 ++++++++++++++++-- .../polymer/more-infos/more-info-content.html | 13 ++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html b/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html index 05a183bfd1b..98c88b7db35 100644 --- a/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html +++ b/homeassistant/components/frontend/www_static/polymer/dialogs/more-info-dialog.html @@ -7,12 +7,14 @@ @@ -27,11 +29,16 @@ Polymer(Polymer.mixin({ stateObj: null, stateHistory: null, hasHistoryComponent: false, + dialogOpen: false, observe: { 'stateObj.attributes': 'reposition' }, + created: function() { + this.dialogOpenChanged = this.dialogOpenChanged.bind(this); + }, + attached: function() { this.listenToStores(true); }, @@ -66,6 +73,13 @@ Polymer(Polymer.mixin({ } }, + dialogOpenChanged: function(ev) { + // we get CustomEvent, undefined and true/false from polymer… + if (typeof ev === 'object') { + this.dialogOpen = ev.detail; + } + }, + changeEntityId: function(entityId) { this.entityId = entityId; diff --git a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html index a06dd06c93f..b80a016686b 100644 --- a/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html +++ b/homeassistant/components/frontend/www_static/polymer/more-infos/more-info-content.html @@ -8,7 +8,7 @@ - +