Commit 4c407894 authored by Christodoulos Psaltis's avatar Christodoulos Psaltis
Browse files

Empty metadata list before cloning it, Refs #375

parent 2604e505
......@@ -1149,6 +1149,11 @@ input.machine {
height: 248px;
width: 345px;
margin-left: 15px;
overflow: auto;
}
.meta-modal div.content li {
margin-bottom: 20px;
}
.meta-modal p {
......
......@@ -696,7 +696,7 @@ function get_metadata(serverID) {
}
},
success: function(data, textStatus, jqXHR) {
update_metadata(data);
list_metadata(data);
}
});
return false;
......
......@@ -656,10 +656,12 @@ $('#editor-2.meta-modal button.save').click( function(){
});
// update metadata in edit dialog
function update_metadata(data) {
function list_metadata(data) {
// empty the list if it already exists
$("#editor-1 div.content ul.meta-list").empty();
// get the values to show
meta = data.metadata.values;
// show values
for (key in meta) {
pair = $("ul.meta-template li").clone();
pair.find("label").text(key);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment