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
534133b9
Commit
534133b9
authored
Jan 04, 2019
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use external_reference marker for force create subgadget
parent
4bd32c11
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
jsonform.gadget.js
jsonform.gadget.js
+3
-0
jsonform/gadget_json_generated_form_child.js
jsonform/gadget_json_generated_form_child.js
+4
-2
No files found.
jsonform.gadget.js
View file @
534133b9
...
...
@@ -251,6 +251,7 @@
url
,
download_url
,
hash
,
external_reference
=
false
,
queue
;
// XXX need use `id` property
if
(
!
schema_path
)
{
...
...
@@ -271,6 +272,7 @@
hash
=
url
.
hash
;
url
=
url
.
href
;
if
(
download_url
.
startsWith
(
"
urn:jio:
"
))
{
external_reference
=
true
;
queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
return
g
.
resolveExternalReference
(
download_url
,
schema_path
,
path
);
...
...
@@ -329,6 +331,7 @@
})
.
push
(
function
(
schema_arr
)
{
checkAndMarkSoftCircular
(
g
,
schema_arr
,
schema_path
,
url
);
schema_arr
.
external_reference
=
external_reference
;
return
schema_arr
;
});
}
...
...
jsonform/gadget_json_generated_form_child.js
View file @
534133b9
...
...
@@ -1370,7 +1370,7 @@
schema_arr
=
properties
[
key
];
filtered_schema_arr
=
schemaArrFilteredByDocument
(
schema_arr
,
json_document
[
key
]);
// XXX need schema merge with patternProperties passed key
if
(
checkSchemaArrOneChoise
(
schema_arr
))
{
if
(
checkSchemaArrOneChoise
(
schema_arr
)
&&
!
schema_arr
.
external_reference
)
{
if
(
required
.
indexOf
(
key
)
>=
0
)
{
used_properties
[
key
]
=
false
;
q
.
push
(
render_field
.
bind
(
g
,
g
,
key
,
path
,
...
...
@@ -1390,13 +1390,15 @@
}
}
if
(
!
used_properties
.
hasOwnProperty
(
key
)
&&
json_document
.
hasOwnProperty
(
key
))
{
(
json_document
.
hasOwnProperty
(
key
)
||
schema_arr
.
external_reference
))
{
used_properties
[
key
]
=
""
;
q
.
push
(
addSubForm
.
bind
(
g
,
{
gadget
:
g
,
property_name
:
key
,
parent_path
:
path
,
delete_button
:
!
schema_arr
.
external_reference
,
schema_arr
:
filtered_schema_arr
,
json_document
:
json_document
[
key
]
})
...
...
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