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
34c1df85
Commit
34c1df85
authored
Oct 25, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delegate all external references to resolveExternalReference
not just only `urn:jio:` ones
parent
9dafc5c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
jsonform.gadget.js
jsonform.gadget.js
+4
-24
No files found.
jsonform.gadget.js
View file @
34c1df85
...
@@ -153,19 +153,6 @@
...
@@ -153,19 +153,6 @@
return
absolute_url
;
return
absolute_url
;
}
}
function
downloadJSON
(
url
)
{
return
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
url
:
url
,
dataType
:
"
json
"
});
})
.
push
(
function
(
evt
)
{
return
evt
.
target
.
response
;
});
}
function
resolveLocalReference
(
schema
,
ref
)
{
function
resolveLocalReference
(
schema
,
ref
)
{
// 2 here is for #/
// 2 here is for #/
var
i
,
ref_path
=
ref
.
substr
(
2
,
ref
.
length
),
var
i
,
ref_path
=
ref
.
substr
(
2
,
ref
.
length
),
...
@@ -269,17 +256,10 @@
...
@@ -269,17 +256,10 @@
return
mapped_url
;
return
mapped_url
;
});
});
}
else
{
}
else
{
if
(
download_url
.
startsWith
(
"
urn:jio:
"
))
{
queue
=
RSVP
.
Queue
()
queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
return
g
.
resolveExternalReference
(
download_url
);
return
g
.
resolveExternalReference
(
download_url
);
});
});
}
else
{
queue
=
RSVP
.
Queue
()
.
push
(
function
()
{
return
downloadJSON
(
download_url
);
});
}
queue
queue
.
push
(
function
(
json
)
{
.
push
(
function
(
json
)
{
if
(
checkHardCircular
(
g
,
path
,
url
))
{
if
(
checkHardCircular
(
g
,
path
,
url
))
{
...
...
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