diff --git a/homeassistant/components/frontend/www_static/polymer/components/display-time.html b/homeassistant/components/frontend/www_static/polymer/components/display-time.html index 6dc4977fc10..335366899dc 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/display-time.html +++ b/homeassistant/components/frontend/www_static/polymer/components/display-time.html @@ -1,26 +1,25 @@ - + + + - - - - + }, + + computeTime: function(dateObj) { + return dateObj ? uiUtil.formatTime(dateObj) : ''; + }, + }); +})(); + diff --git a/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html b/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html index 4b6177a6949..ecd918c5933 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html +++ b/homeassistant/components/frontend/www_static/polymer/components/ha-logbook.html @@ -2,16 +2,31 @@ - - - @@ -231,16 +235,69 @@ type: Boolean, value: false, }, + + selectedHistory: { + type: String, + value: 'history', + readOnly: true, + }, + + isSelectedHistory: { + type: Boolean, + computed: 'computeIsSelected(selected, selectedHistory)', + }, + + selectedLogbook: { + type: String, + value: 'logbook', + readOnly: true, + }, + + isSelectedLogbook: { + type: Boolean, + computed: 'computeIsSelected(selected, selectedLogbook)', + }, + + selectedDevEvent: { + type: String, + value: 'devEvent', + readOnly: true, + }, + + isSelectedDevEvent: { + type: Boolean, + computed: 'computeIsSelected(selected, selectedDevEvent)', + }, + + selectedDevState: { + type: String, + value: 'devState', + readOnly: true, + }, + + isSelectedDevState: { + type: Boolean, + computed: 'computeIsSelected(selected, selectedDevState)', + }, + + selectedDevService: { + type: String, + value: 'devService', + readOnly: true, + }, + + isSelectedDevService: { + type: Boolean, + computed: 'computeIsSelected(selected, selectedDevService)', + }, + + }, listeners: { 'menu.core-select': 'menuSelect', }, - attached: function() { - this.togglePanel = this.togglePanel.bind(this); - }, - stateStoreChanged: function(stateStore) { this.activeFilters = stateStore.domains.filter(function(domain) { return domain in uiConstants.STATE_FILTERS; @@ -270,7 +327,7 @@ return; } - this.togglePanel(); + this.closeDrawer(); this.selected = newChoice; if (newChoice.substr(0, 7) === 'states_') { @@ -286,8 +343,8 @@ this.narrow = detail.narrow; }, - togglePanel: function() { - this.$.drawer.togglePanel(); + closeDrawer: function() { + this.$.drawer.closeDrawer(); }, handleLogOut: function() { @@ -309,6 +366,10 @@ // /temp work around + computeIsSelected: function(selected, selectedType) { + return selected === selectedType; + }, + filterIcon: function(filter) { return uiUtil.domainIcon(filter); }, @@ -322,4 +383,4 @@ } }); })(); - + diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html index ed728502ab7..da128bc75fa 100644 --- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html +++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html @@ -12,8 +12,7 @@