Commit 9bb9c69c authored by Boris Kocherov's avatar Boris Kocherov

fix pattern properties schema_path

parent 65280151
......@@ -798,7 +798,7 @@
root.appendChild(child);
}
function addAdditional(schema) {
function addAdditional(title, schema, s_path) {
var div,
div_input,
input,
......@@ -824,10 +824,10 @@
queue
.push(function () {
return expandSchema(g, schema, schema_path + '/additionalProperties');
return expandSchema(g, schema, s_path);
})
.push(function (schema_arr) {
return render_schema_selector(g, "add custom property", schema_arr, function (value) {
return render_schema_selector(g, "add " + title, schema_arr, function (value) {
return addSubForm({
gadget: g,
element: input,
......@@ -853,7 +853,7 @@
gadget: g,
property_name: property_name,
path: path,
schema_path: schema_path + '/additionalProperties',
schema_path: s_path,
schema_part: schema,
default_dict: default_dict[property_name]
})
......@@ -948,8 +948,11 @@
});
if (json_field.patternProperties !== undefined) {
// XXX need loop on any pattern properties
if (json_field.patternProperties['.*'] !== undefined) {
addAdditional(json_field.patternProperties['.*']);
addAdditional(".* property",
json_field.patternProperties['.*'],
schema_path + '/patternProperties/.*');
}
}
......@@ -959,7 +962,7 @@
additionalProperties = json_field.additionalProperties;
}
if (additionalProperties !== false) {
addAdditional(additionalProperties);
addAdditional("additional property", additionalProperties, schema_path + '/additionalProperties');
}
for (key in default_dict) {
......
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