diff --git a/static/juice.css b/static/juice.css index 889fa23..3c446d1 100644 --- a/static/juice.css +++ b/static/juice.css @@ -80,6 +80,7 @@ nav span:hover { .edit, .save, .lock, .unlock { font-size: 0.8em; color: dimgrey; + margin-left: 0.4em; } .edit:hover, .save:hover, .lock:hover, .unlock:hover { diff --git a/static/juice.js b/static/juice.js index 4e0ecd3..1a778c4 100644 --- a/static/juice.js +++ b/static/juice.js @@ -122,6 +122,7 @@ function new_device() { } function lock_device(device) { + if (device.querySelector('.save')) { return; } let fields = device.querySelectorAll('.editable'); fields.forEach(function(field) { field.querySelector('.edit').remove(); diff --git a/templates/index.html b/templates/index.html index f9de7d3..23600c7 100644 --- a/templates/index.html +++ b/templates/index.html @@ -18,16 +18,16 @@
{% for device in network %}
-
{{ device.id }}
-
{{ device.description }}
-
{{ device.location }}
-
{{ device.ip_address }}
+
{{ device.id }}
+
{{ device.description }}
+
{{ device.location }}
+
{{ device.ip_address }}
{% for sub_dev in device.sub_devices %}
{{ sub_dev.id }}
-
{{ sub_dev.description }}
+
{{ sub_dev.description }}
{% endfor %}
@@ -38,19 +38,19 @@