Commit 77d513dc authored by Boris Kocherov's avatar Boris Kocherov

load schema remove jquery dependence

parent f2431d1b
......@@ -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>
......
/*jslint nomen: true, maxlen: 200, indent: 2*/
/*global window, rJS, console, RSVP, jQuery, jIO, tv4, URI, JSON, $ */
(function (window, rJS, $, RSVP) {
/*global window, rJS, console, RSVP, jIO, 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment