summaryrefslogtreecommitdiffstats
path: root/html_server/templates/property_info.html
diff options
context:
space:
mode:
Diffstat (limited to 'html_server/templates/property_info.html')
-rw-r--r--html_server/templates/property_info.html30
1 files changed, 14 insertions, 16 deletions
diff --git a/html_server/templates/property_info.html b/html_server/templates/property_info.html
index ce974ac..4e7c92f 100644
--- a/html_server/templates/property_info.html
+++ b/html_server/templates/property_info.html
@@ -12,14 +12,14 @@
$.getJSON(completePath, function(json){
checkError(json)
- var valFieldId = "#actVal"+prop.split('/').join("_")
- $(valFieldId).text(json.value)
+ var valFieldId = "#set_val_" + prop.split('/').join("_")
+ $(valFieldId).val(json.value)
})
}
function setProperty(prop)
{
- var value = document.getElementById("set_val_" + prop).value;
+ var value = document.getElementById("set_val_" + prop.split('/').join("_")).value;
if(value == "")
return
@@ -34,7 +34,7 @@
})
};
</script>
-
+
<table class="infoTable">
<tr class="infoTable">
<td class="infoTable">Name</td>
@@ -55,24 +55,22 @@
</td>
<td class="infoTable">
<table>
- <tr>
- <td id = "actVal{{ property.path.replace('/', '_') }}" class="infoTable">
- {{ value }}
- </td>
- {% if 'R' in property.mode %}
- <td>
- <input type="button" value="update" style="width:100%;height:100%" onclick="updateProperty('{{ property.path }}')">
- </td>
- {% endif %}
- </tr>
- {% if 'W' in property.mode %}
+ {% if 'R' in property.mode %}
<tr>
<td>
- <input type="text" name="set_val_{{ property.path }}" id="set_val_{{ property.path }}" value="" />
+ <input type="text"
+ name="set_val_{{ property.path.replace('/', '_') }}"
+ id="set_val_{{ property.path.replace('/', '_') }}"
+ value="{{ value[property.path] }}" />
</td>
+ {% if 'W' in property.mode %}
<td>
<input type="button" value="set" style="width:100%;height:100%" onclick="setProperty('{{ property.path }}')">
</td>
+ {% endif %}
+ <td>
+ <input type="button" value="update" style="width:100%;height:100%" onclick="updateProperty('{{ property.path }}')">
+ </td>
</tr>
{% endif %}
</table>