diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index e8af836422e..50bce72d51b 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -351,7 +351,7 @@ class RequestHandler(BaseHTTPRequestHandler): # Describe state machine: write(("
" "
" - "
" + "
" "

" " States

" "
change)").format(action, state.entity_id)) + write(("").format(action, state.entity_id)) write("{}{}".format( attributes, util.datetime_to_str(state.last_changed))) @@ -413,12 +414,9 @@ class RequestHandler(BaseHTTPRequestHandler): self.server.hass.services.services.items()): write("{}".format(domain)) - for index, service in enumerate(services): - if index > 0: - write(", ") - - write("{1}".format( - domain, service)) + write(", ".join( + "{1}".format( + domain, service) for service in sorted(services))) write("") diff --git a/homeassistant/components/http/www_static/script.js b/homeassistant/components/http/www_static/script.js index 8f1ccd6b06d..b9f4f1cf3d5 100644 --- a/homeassistant/components/http/www_static/script.js +++ b/homeassistant/components/http/www_static/script.js @@ -24,10 +24,11 @@ $(function() { form.find("#service_data").val(""); } - if(el.attr("data-service-autofire")) { + // if it has the attirbute autofire we submit the form + if(el.is("[data-service-autofire]")) { form.submit(); } return false; - }).css('cursor', 'pointer') + }) }) \ No newline at end of file diff --git a/homeassistant/components/http/www_static/style.css b/homeassistant/components/http/www_static/style.css index f116e2cb763..f0ebb98c271 100644 --- a/homeassistant/components/http/www_static/style.css +++ b/homeassistant/components/http/www_static/style.css @@ -1,5 +1,18 @@ @import url(//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.2/css/bootstrap.min.css); +.states td .glyphicon { + margin-top: 3px; +} + +.states td:nth-child(3) { + max-width: 550px; + word-break: break-word; +} + +.states td:nth-child(4) { + white-space: nowrap; +} + .panel > form, .panel > form > .table { margin-bottom: 0; } @@ -37,7 +50,3 @@ .form-fire-event .form-group:last-child { margin-bottom: 0; } - -*[data-service] { - text-decoration: dashed; -} \ No newline at end of file