Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rjs_json_form
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
rjs_json_form
Commits
9bb9c69c
Commit
9bb9c69c
authored
Apr 23, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pattern properties schema_path
parent
65280151
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
gadget_json_generated_form.js
gadget_json_generated_form.js
+9
-6
No files found.
gadget_json_generated_form.js
View file @
9bb9c69c
...
@@ -798,7 +798,7 @@
...
@@ -798,7 +798,7 @@
root
.
appendChild
(
child
);
root
.
appendChild
(
child
);
}
}
function
addAdditional
(
schema
)
{
function
addAdditional
(
title
,
schema
,
s_path
)
{
var
div
,
var
div
,
div_input
,
div_input
,
input
,
input
,
...
@@ -824,10 +824,10 @@
...
@@ -824,10 +824,10 @@
queue
queue
.
push
(
function
()
{
.
push
(
function
()
{
return
expandSchema
(
g
,
schema
,
s
chema_path
+
'
/additionalProperties
'
);
return
expandSchema
(
g
,
schema
,
s
_path
);
})
})
.
push
(
function
(
schema_arr
)
{
.
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
({
return
addSubForm
({
gadget
:
g
,
gadget
:
g
,
element
:
input
,
element
:
input
,
...
@@ -853,7 +853,7 @@
...
@@ -853,7 +853,7 @@
gadget
:
g
,
gadget
:
g
,
property_name
:
property_name
,
property_name
:
property_name
,
path
:
path
,
path
:
path
,
schema_path
:
s
chema_path
+
'
/additionalProperties
'
,
schema_path
:
s
_path
,
schema_part
:
schema
,
schema_part
:
schema
,
default_dict
:
default_dict
[
property_name
]
default_dict
:
default_dict
[
property_name
]
})
})
...
@@ -948,8 +948,11 @@
...
@@ -948,8 +948,11 @@
});
});
if
(
json_field
.
patternProperties
!==
undefined
)
{
if
(
json_field
.
patternProperties
!==
undefined
)
{
// XXX need loop on any pattern properties
if
(
json_field
.
patternProperties
[
'
.*
'
]
!==
undefined
)
{
if
(
json_field
.
patternProperties
[
'
.*
'
]
!==
undefined
)
{
addAdditional
(
json_field
.
patternProperties
[
'
.*
'
]);
addAdditional
(
"
.* property
"
,
json_field
.
patternProperties
[
'
.*
'
],
schema_path
+
'
/patternProperties/.*
'
);
}
}
}
}
...
@@ -959,7 +962,7 @@
...
@@ -959,7 +962,7 @@
additionalProperties
=
json_field
.
additionalProperties
;
additionalProperties
=
json_field
.
additionalProperties
;
}
}
if
(
additionalProperties
!==
false
)
{
if
(
additionalProperties
!==
false
)
{
addAdditional
(
additionalProperties
);
addAdditional
(
"
additional property
"
,
additionalProperties
,
schema_path
+
'
/additionalProperties
'
);
}
}
for
(
key
in
default_dict
)
{
for
(
key
in
default_dict
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment