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
Jérome Perrin
rjs_json_form
Commits
16ad6d13
Commit
16ad6d13
authored
Oct 04, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve documentation thanks
@jerome
parent
9ae50ec1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
README.md
README.md
+21
-4
No files found.
README.md
View file @
16ad6d13
...
@@ -40,8 +40,11 @@ rJS(window)
...
@@ -40,8 +40,11 @@ rJS(window)
});
});
```
```
In parent gadget downloadJSON() can be declared. DownloadJSON() can be used to
In parent gadget downloadJSON() can be declared. downloadJSON() can be used to
fetch schema from jio storage. Example:
fetch schema from
[
jio storage
](
https://jio.nexedi.com/
)
. Gadget runs downloadJSON()
for fetching schema if schema_url starts with
`urn:jio:`
but path absolutisation works
only for
`urn:jio:reference?`
. Example which demonstrates how a schema can be fetched
from jio storage:
```
javascript
```
javascript
rJS
(
window
)
rJS
(
window
)
...
@@ -50,11 +53,25 @@ rJS(window)
...
@@ -50,11 +53,25 @@ rJS(window)
url
=
arr
[
0
],
url
=
arr
[
0
],
reference
,
reference
,
args
;
args
;
// return g.jio_getAttachment(id, "data", {format: "json"});
if
(
url
.
startsWith
(
"
urn:jio:reference?
"
))
{
if
(
url
.
startsWith
(
"
urn:jio:reference?
"
))
{
reference
=
decodeURIComponent
(
url
.
replace
(
"
urn:jio:reference?
"
,
""
));
reference
=
decodeURIComponent
(
url
.
replace
(
"
urn:jio:reference?
"
,
""
));
args
=
{
args
=
{
query
:
'
(portal_type: "JSON Schema") AND ((reference: "
'
+
reference
+
'
"))
'
,
query
:
Query
.
objectToSearchText
({
type
:
"
complex
"
,
operator
:
"
AND
"
,
query_list
:
[
{
key
:
"
portal_type
"
,
type
:
"
simple
"
,
value
:
"
JSON Schema
"
},
{
key
:
"
reference
"
,
type
:
"
simple
"
,
value
:
reference
}
]
}),
limit
:
[
0
,
1
],
limit
:
[
0
,
1
],
select_list
:
[],
select_list
:
[],
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
sort_on
:
[[
"
modification_date
"
,
"
descending
"
]]
...
...
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