Lint fixes

This commit is contained in:
Paulus Schoutsen 2016-07-17 21:24:55 -07:00
parent 4029f16e97
commit ff0e24fecb
7 changed files with 58 additions and 1 deletions

View File

@ -65,6 +65,10 @@ Polymer({
hass: {
type: Object,
},
entryObj: {
type: Object,
},
},
entityClicked: function (ev) {

View File

@ -32,6 +32,10 @@ Polymer({
hass: {
type: Object,
},
stateObj: {
type: Object,
},
},
computeTitle: function (stateObj) {

View File

@ -39,6 +39,10 @@ Polymer({
is: 'ha-labeled-slider',
properties: {
caption: {
type: String,
},
icon: {
type: String,
},

View File

@ -0,0 +1,40 @@
<dom-module id='ha-menu-button'>
<template>
<style>
.invisible {
visibility: hidden;
}
</style>
<paper-icon-button
icon='mdi:menu'
class$='[[computeMenuButtonClass(narrow, showMenu)]]'
on-tap='toggleMenu'
></paper-icon-button>
</template>
</dom-module>
<script>
Polymer({
is: 'ha-menu-button',
properties: {
narrow: {
type: Boolean,
value: false,
},
showMenu: {
type: Boolean,
value: false,
},
},
computeMenuButtonClass: function (narrow, showMenu) {
return !narrow && showMenu ? 'invisible' : '';
},
toggleMenu: function () {
this.fire('open-menu');
},
});
</script>

View File

@ -6,4 +6,5 @@
<link rel="import" href="../layouts/partial-base.html">
<link rel="import" href="../components/display-time.html">
<link rel="import" href="../components/domain-icon.html">
<link rel="import" href="../components/ha-menu-button.html">
<link rel="import" href="../../bower_components/paper-input/paper-textarea.html">

View File

@ -24,6 +24,10 @@ Polymer({
is: 'state-card-toggle',
properties: {
hass: {
type: Object,
},
inDialog: {
type: Boolean,
value: false,

View File

@ -20,7 +20,7 @@
<template>
<state-badge state-obj='[[stateObj]]' in-dialog='[[inDialog]]'></state-badge>
<a href='[[stateObj.state]]' target='_blank' class='name' id='link'>[[stateObj.entityDisplay]]</a>
<a href$='[[stateObj.state]]' target='_blank' class='name' id='link'>[[stateObj.entityDisplay]]</a>
</template>
</dom-module>