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
Rafael Monnerat
rjs_json_form
Commits
77d513dc
Commit
77d513dc
authored
Feb 24, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load schema remove jquery dependence
parent
f2431d1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
gadget_erp5_page_slap_load_schema.html
gadget_erp5_page_slap_load_schema.html
+0
-3
gadget_erp5_page_slap_load_schema.js
gadget_erp5_page_slap_load_schema.js
+15
-7
No files found.
gadget_erp5_page_slap_load_schema.html
View file @
77d513dc
...
...
@@ -8,11 +8,8 @@
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"URI.js"
type=
"text/javascript"
></script>
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
<script
src=
"tv4.min.js"
type=
"text/javascript"
></script>
<script
src=
"URI.js"
type=
"text/javascript"
></script>
<script
src=
"jio.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_slap_load_schema.js"
type=
"text/javascript"
></script>
</head>
...
...
gadget_erp5_page_slap_load_schema.js
View file @
77d513dc
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS, console, RSVP, j
Query, jIO, tv4, URI, JSON, $
*/
(
function
(
window
,
rJS
,
$
,
RSVP
)
{
/*global window, rJS, console, RSVP, j
IO, tv4, URI, JSON
*/
(
function
(
window
,
rJS
,
RSVP
,
URI
,
jIO
,
tv4
)
{
"
use strict
"
;
function
extend
(
obj
,
obj1
)
{
for
(
var
i
in
obj1
)
{
if
(
obj1
.
hasOwnProperty
(
i
))
{
obj
[
i
]
=
obj1
[
i
];
}
}
}
function
getJSON
(
url
)
{
var
protocol
=
URI
(
url
).
protocol
();
if
(
protocol
===
"
http
"
||
protocol
===
"
https
"
)
{
...
...
@@ -96,7 +104,7 @@
base_url
);
}).
push
(
function
(
referencedx
)
{
$
.
extend
(
expanded_json_schema
,
referencedx
);
extend
(
expanded_json_schema
,
referencedx
);
delete
expanded_json_schema
.
$ref
;
return
true
;
});
...
...
@@ -119,7 +127,7 @@
base_url
)
.
push
(
function
(
referencedx
)
{
$
.
extend
(
expanded_json_schema
.
properties
[
p
],
referencedx
);
extend
(
expanded_json_schema
.
properties
[
p
],
referencedx
);
if
(
json_schema
.
properties
[
p
].
$ref
)
{
delete
expanded_json_schema
.
properties
[
p
].
$ref
;
}
...
...
@@ -149,13 +157,13 @@
base_url
).
push
(
function
(
referencedx
)
{
if
(
referencedx
.
properties
)
{
$
.
extend
(
extend
(
expanded_json_schema
.
properties
,
referencedx
.
properties
);
delete
referencedx
.
properties
;
}
$
.
extend
(
expanded_json_schema
,
referencedx
);
extend
(
expanded_json_schema
,
referencedx
);
});
}
...
...
@@ -275,4 +283,4 @@
});
});
}(
window
,
rJS
,
$
,
RSVP
));
\ No newline at end of file
}(
window
,
rJS
,
RSVP
,
URI
,
jIO
,
tv4
));
\ No newline at end of file
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