1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Remove ES6 from web components

This commit is contained in:
Paulus Schoutsen
2016-06-11 23:55:43 -07:00
parent 19eb3fa193
commit 943e9b2899
6 changed files with 11 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ Polymer({
},
imageChanged: function (newVal) {
this.$.badge.style.backgroundImage = newVal ? `url(${newVal})` : '';
this.$.badge.style.backgroundImage = newVal ? 'url(' + newVal + ')' : '';
},
});
</script>

View File

@@ -68,15 +68,17 @@ Polymer({
},
},
viewTapped() {
viewTapped: function () {
this.fire('view-tapped');
},
viewSelected(ev) {
viewSelected: function (ev) {
var view = ev.detail.item.getAttribute('data-entity') || null;
var current = this.currentView || null;
if (view !== current) {
this.async(function () { this.hass.viewActions.selectView(view); }.bind(this), 0);
this.async(function () {
this.hass.viewActions.selectView(view);
}.bind(this), 0);
}
},
});