From 5e9303dbf207b526500fba29fda203d3ada93e1a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 1 Jan 2015 22:02:28 -0800 Subject: [PATCH] Create cards and more-info elements dynamically --- .../polymer/cards/state-card-content.html | 31 ++++++------- .../polymer/home-assistant-api.html | 2 +- .../polymer/more-infos/more-info-content.html | 43 +++++++------------ .../polymer/more-infos/more-info-sun.html | 6 +-- 4 files changed, 34 insertions(+), 48 deletions(-) diff --git a/homeassistant/components/http/www_static/polymer/cards/state-card-content.html b/homeassistant/components/http/www_static/polymer/cards/state-card-content.html index 9d831f7a955..eecf3d2db37 100644 --- a/homeassistant/components/http/www_static/polymer/cards/state-card-content.html +++ b/homeassistant/components/http/www_static/polymer/cards/state-card-content.html @@ -3,7 +3,7 @@ - + + diff --git a/homeassistant/components/http/www_static/polymer/home-assistant-api.html b/homeassistant/components/http/www_static/polymer/home-assistant-api.html index fb8dc40d51d..9342745c44c 100644 --- a/homeassistant/components/http/www_static/polymer/home-assistant-api.html +++ b/homeassistant/components/http/www_static/polymer/home-assistant-api.html @@ -25,7 +25,7 @@ }; PolymerExpressions.prototype.HATimeStripDate = function(timeString) { - return timeString.split(' ')[0]; + return (timeString || "").split(' ')[0]; }; diff --git a/homeassistant/components/http/www_static/polymer/more-infos/more-info-content.html b/homeassistant/components/http/www_static/polymer/more-infos/more-info-content.html index 59dc6623599..3292809cd2d 100644 --- a/homeassistant/components/http/www_static/polymer/more-infos/more-info-content.html +++ b/homeassistant/components/http/www_static/polymer/more-infos/more-info-content.html @@ -5,7 +5,7 @@ - + + diff --git a/homeassistant/components/http/www_static/polymer/more-infos/more-info-sun.html b/homeassistant/components/http/www_static/polymer/more-infos/more-info-sun.html index 9bf74b104b9..20b63b30afa 100644 --- a/homeassistant/components/http/www_static/polymer/more-infos/more-info-sun.html +++ b/homeassistant/components/http/www_static/polymer/more-infos/more-info-sun.html @@ -46,11 +46,7 @@