Fix logbook open panel

This commit is contained in:
Paulus Schoutsen 2016-07-23 08:27:10 -07:00
parent 30a58b2c26
commit de754bb903
2 changed files with 16 additions and 5 deletions

View File

@ -58,7 +58,7 @@
<span class='name'>[[item.name]]</span>
</template>
<template is='dom-if' if="[[item.entityId]]">
<a href='#' on-click="entityClicked" class='name'>[[item.name]]</a>
<a href='#' on-tap="entityClicked" class='name'>[[item.name]]</a>
</template>
<span> </span>
<span>[[item.message]]</span>
@ -82,5 +82,10 @@ Polymer({
value: [],
},
},
entityClicked: function (ev) {
ev.preventDefault();
this.hass.moreInfoActions.selectEntity(ev.model.item.entityId);
}
});
</script>

View File

@ -72,17 +72,23 @@ Polymer({
selectedDate: {
type: String,
bindNuclear: function (hass) { return hass.logbookGetters.currentDate; },
bindNuclear: function (hass) {
return hass.logbookGetters.currentDate;
},
},
isLoading: {
type: Boolean,
bindNuclear: function (hass) { return hass.logbookGetters.isLoadingEntries; },
bindNuclear: function (hass) {
return hass.logbookGetters.isLoadingEntries;
},
},
isStale: {
type: Boolean,
bindNuclear: function (hass) { return hass.logbookGetters.isCurrentStale; },
bindNuclear: function (hass) {
return hass.logbookGetters.isCurrentStale;
},
observer: 'isStaleChanged',
},
@ -114,7 +120,7 @@ Polymer({
},
datepickerFocus: function () {
// this.datePicker.adjustPosition();
this.datePicker.adjustPosition();
},
attached: function () {