From 141cb7cba5c36a9c5415772e2de9823f927d7abb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 31 Oct 2015 20:04:06 +0100 Subject: web: o Better form interaction: enter to submit and autofocus on the field. --- web/static/app/app.js | 2 - .../app/templates/device-edit-attribute.modal.html | 48 ++++++++++++---------- web/static/app/templates/device.html | 6 ++- 3 files changed, 30 insertions(+), 26 deletions(-) (limited to 'web/static/app') diff --git a/web/static/app/app.js b/web/static/app/app.js index fedfb54..a76aa33 100644 --- a/web/static/app/app.js +++ b/web/static/app/app.js @@ -20,8 +20,6 @@ ctrl.label = attributeName.substr(0, 1).toUpperCase() + attributeName.substr(1); ctrl.value = outer.device[attributeName]; - ctrl.error = 'fail'; - ctrl.update = function () { DillerRpc.patchDevice(outer.device.id, {attribute: attributeName, value: ctrl.value}) .then(function (res) { diff --git a/web/static/app/templates/device-edit-attribute.modal.html b/web/static/app/templates/device-edit-attribute.modal.html index fc22d7b..10314e5 100644 --- a/web/static/app/templates/device-edit-attribute.modal.html +++ b/web/static/app/templates/device-edit-attribute.modal.html @@ -1,28 +1,32 @@ - -