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
1364588d
Commit
1364588d
authored
Oct 05, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename downloadJSON() to resolveExternalReference() thanks
@jerome
parent
16ad6d13
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
README.md
README.md
+4
-4
jsonform.gadget.js
jsonform.gadget.js
+2
-2
No files found.
README.md
View file @
1364588d
...
...
@@ -40,15 +40,15 @@ rJS(window)
});
```
In parent gadget
downloadJSON() can be declared. downloadJSON
() can be used to
fetch schema from
[
jio storage
](
https://jio.nexedi.com/
)
. Gadget runs
downloadJSON
()
In parent gadget
resolveExternalReference() can be declared. resolveExternalReference
() can be used to
fetch schema from
[
jio storage
](
https://jio.nexedi.com/
)
. Gadget runs
resolveExternalReference
()
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
rJS
(
window
)
.
allowPublicAcquisition
(
"
downloadJSON
"
,
function
(
arr
)
{
.
allowPublicAcquisition
(
"
resolveExternalReference
"
,
function
(
arr
)
{
var
g
=
this
,
url
=
arr
[
0
],
reference
,
...
...
@@ -218,7 +218,7 @@ gadget consists of three parts:
to generate schema selector. Contains various schema optimisations
which reduce user choice according to schema logic.
*
Using of parent_gadget.
downloadJSON
() to resolve "urn:jio:" url schema
*
Using of parent_gadget.
resolveExternalReference
() to resolve "urn:jio:" url schema
links - it allows to use gadget inside officejs application and work
with schemas saved in jio storage. Relative links are correctly resolved too.
...
...
jsonform.gadget.js
View file @
1364588d
...
...
@@ -272,7 +272,7 @@
if
(
download_url
.
startsWith
(
"
urn:jio:
"
))
{
queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
return
g
.
downloadJSON
(
download_url
);
return
g
.
resolveExternalReference
(
download_url
);
});
}
else
{
queue
=
RSVP
.
Queue
()
...
...
@@ -636,7 +636,7 @@
g
.
props
=
{};
g
.
options
=
{};
})
.
declareAcquiredMethod
(
"
downloadJSON
"
,
"
downloadJSON
"
)
.
declareAcquiredMethod
(
"
resolveExternalReference
"
,
"
resolveExternalReference
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
allowPublicAcquisition
(
"
rootNotifyChange
"
,
function
()
{
this
.
props
.
changed
=
true
;
...
...
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