Commit 8effb805 authored by Jérome Perrin's avatar Jérome Perrin

Revert "do not fail when loading a json with unknown _classes"

This reverts commit 06a082d6.
parent c44137bd
...@@ -90,8 +90,7 @@ ...@@ -90,8 +90,7 @@
var node_id = that.getNodeId(element_id); var node_id = that.getNodeId(element_id);
$("#dialog-fieldset").children().remove(); $("#dialog-fieldset").children().remove();
var element_type = node_dict[node_id]._class.replace('.', '-'); var element_type = node_dict[node_id]._class.replace('.', '-');
var property_list = (configuration[element_type] || {}).property_list || []; var property_list = configuration[element_type].property_list || [];
property_list.push({"_class": "Dream.Property", "id": "_class"});
fieldset.append( fieldset.append(
'<label>ID</label><input type="text" name="id" id="id" value="' + '<label>ID</label><input type="text" name="id" id="id" value="' +
...@@ -201,8 +200,9 @@ ...@@ -201,8 +200,9 @@
$("#dialog-form").dialog("open"); $("#dialog-form").dialog("open");
}); });
// Store default values // Store default values
var data = {}, var data = {}, property_list = configuration[element_type][
property_list = (configuration[element_type] || {} ) ["property_list"] || []; "property_list"
] || [];
var updateDefaultData = function (data, property_list) { var updateDefaultData = function (data, property_list) {
$.each(property_list, function (idx, value) { $.each(property_list, function (idx, value) {
if (value) { if (value) {
......
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