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

View File

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