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 @@
...
@@ -251,6 +251,7 @@
url
,
url
,
download_url
,
download_url
,
hash
,
hash
,
external_reference
=
false
,
queue
;
queue
;
// XXX need use `id` property
// XXX need use `id` property
if
(
!
schema_path
)
{
if
(
!
schema_path
)
{
...
@@ -271,6 +272,7 @@
...
@@ -271,6 +272,7 @@
hash
=
url
.
hash
;
hash
=
url
.
hash
;
url
=
url
.
href
;
url
=
url
.
href
;
if
(
download_url
.
startsWith
(
"
urn:jio:
"
))
{
if
(
download_url
.
startsWith
(
"
urn:jio:
"
))
{
external_reference
=
true
;
queue
=
RSVP
.
Queue
()
queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
g
.
resolveExternalReference
(
download_url
,
schema_path
,
path
);
return
g
.
resolveExternalReference
(
download_url
,
schema_path
,
path
);
...
@@ -329,6 +331,7 @@
...
@@ -329,6 +331,7 @@
})
})
.
push
(
function
(
schema_arr
)
{
.
push
(
function
(
schema_arr
)
{
checkAndMarkSoftCircular
(
g
,
schema_arr
,
schema_path
,
url
);
checkAndMarkSoftCircular
(
g
,
schema_arr
,
schema_path
,
url
);
schema_arr
.
external_reference
=
external_reference
;
return
schema_arr
;
return
schema_arr
;
});
});
}
}
...
...
jsonform/gadget_json_generated_form_child.js
View file @
534133b9
...
@@ -1370,7 +1370,7 @@
...
@@ -1370,7 +1370,7 @@
schema_arr
=
properties
[
key
];
schema_arr
=
properties
[
key
];
filtered_schema_arr
=
schemaArrFilteredByDocument
(
schema_arr
,
json_document
[
key
]);
filtered_schema_arr
=
schemaArrFilteredByDocument
(
schema_arr
,
json_document
[
key
]);
// XXX need schema merge with patternProperties passed 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
)
{
if
(
required
.
indexOf
(
key
)
>=
0
)
{
used_properties
[
key
]
=
false
;
used_properties
[
key
]
=
false
;
q
.
push
(
render_field
.
bind
(
g
,
g
,
key
,
path
,
q
.
push
(
render_field
.
bind
(
g
,
g
,
key
,
path
,
...
@@ -1390,13 +1390,15 @@
...
@@ -1390,13 +1390,15 @@
}
}
}
}
if
(
!
used_properties
.
hasOwnProperty
(
key
)
&&
if
(
!
used_properties
.
hasOwnProperty
(
key
)
&&
json_document
.
hasOwnProperty
(
key
))
{
(
json_document
.
hasOwnProperty
(
key
)
||
schema_arr
.
external_reference
))
{
used_properties
[
key
]
=
""
;
used_properties
[
key
]
=
""
;
q
.
push
(
q
.
push
(
addSubForm
.
bind
(
g
,
{
addSubForm
.
bind
(
g
,
{
gadget
:
g
,
gadget
:
g
,
property_name
:
key
,
property_name
:
key
,
parent_path
:
path
,
parent_path
:
path
,
delete_button
:
!
schema_arr
.
external_reference
,
schema_arr
:
filtered_schema_arr
,
schema_arr
:
filtered_schema_arr
,
json_document
:
json_document
[
key
]
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