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
Boris Kocherov
rjs_json_form
Commits
e5d7ec71
Commit
e5d7ec71
authored
Apr 16, 2018
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix expandProperties()
parent
f2c8b82e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
gadget_json_generated_form.js
gadget_json_generated_form.js
+11
-4
No files found.
gadget_json_generated_form.js
View file @
e5d7ec71
...
@@ -302,9 +302,13 @@
...
@@ -302,9 +302,13 @@
var
i
;
var
i
;
for
(
i
=
0
;
i
<
schema_array
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
schema_array
.
length
;
i
+=
1
)
{
// add propertyName to title
// add propertyName to title
schema_array
[
i
].
title
=
p_name
+
'
/
'
+
schema_array
[
i
].
title
;
if
(
schema_array
[
i
].
title
&&
schema_array
.
length
>
1
)
{
schema_array
[
i
].
title
=
p_name
+
'
/
'
+
schema_array
[
i
].
title
;
}
else
{
schema_array
[
i
].
title
=
p_name
;
}
// add propertyName to schemaItem
// add propertyName to schemaItem
schema_array
[
i
].
property_name
=
p
roperty
_name
;
schema_array
[
i
].
property_name
=
p_name
;
}
}
return
schema_array
;
return
schema_array
;
};
};
...
@@ -313,7 +317,7 @@
...
@@ -313,7 +317,7 @@
if
(
properties
.
hasOwnProperty
(
property_name
))
{
if
(
properties
.
hasOwnProperty
(
property_name
))
{
arr
.
push
(
arr
.
push
(
expandSchema
(
g
,
properties
[
property_name
],
schema_path
+
expandSchema
(
g
,
properties
[
property_name
],
schema_path
+
'
/properties/
'
+
encodeJsonPointer
(
property_name
))
encodeJsonPointer
(
property_name
))
.
push
(
addPropertyName
(
property_name
))
.
push
(
addPropertyName
(
property_name
))
);
);
}
}
...
@@ -322,9 +326,12 @@
...
@@ -322,9 +326,12 @@
})
})
.
push
(
function
(
arr
)
{
.
push
(
function
(
arr
)
{
var
i
,
var
i
,
z
,
schema_arr
=
[];
schema_arr
=
[];
for
(
i
=
0
;
i
<
arr
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
arr
.
length
;
i
+=
1
)
{
schema_arr
.
concat
(
arr
[
i
]);
for
(
z
=
0
;
z
<
arr
[
i
].
length
;
z
+=
1
)
{
schema_arr
.
push
(
arr
[
i
][
z
]);
}
}
}
return
schema_arr
;
return
schema_arr
;
});
});
...
...
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