Commit 1a701b9b authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

getContent of expandablefield returns only the updated contents

parent 20e3d9a9
......@@ -262,13 +262,22 @@
return result;
})
.push(function (results) {
var keys, index;
if (Object.keys(results).length !== 1) {
console.log("the expandable property results must contain" +
"a single key of an object that can contain detailed results");
}
results[Object.keys(results)[0]][select.getAttribute('name')] =
select.options[select.selectedIndex].value;
console.log(results);
keys = Object.keys(results[Object.keys(results)[0]]);
for (index = 0; index <= keys.length - 1; index +=1) {
if (keys[index] !== select.options[select.selectedIndex].value &&
keys[index] !== select.getAttribute('name')) {
delete results[Object.keys(results)[0]][keys[index]];
break;
}
}
return results;
});
});
......
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