Commit 4b46b072 authored by Boris Kocherov's avatar Boris Kocherov

make code better understandable

parent b5991f24
......@@ -343,7 +343,7 @@
function render_select_type(gadget, title, schema_arr, event, rerender) {
return RSVP.Queue()
.push(function () {
var type_arr = [],
var schema_alternatives = [],
schema_item,
description,
i,
......@@ -366,7 +366,7 @@
desc = "";
}
for (ii = 0; ii < types.length; ii += 1) {
type_arr.push({
schema_alternatives.push({
title: desc + types[ii],
value: {
property_name: property_name,
......@@ -385,7 +385,7 @@
description = description || schema_item.schema.description;
for (z = 0; z < schema_item.schema.type.length; z += 1) {
type = schema_item.schema.type[z];
type_arr.push({
schema_alternatives.push({
title: description + ' # ' + type,
value: {
type: type,
......@@ -399,7 +399,7 @@
description = description ||
schema_item.schema.type ||
schema_item.schema.description;
type_arr.push({
schema_alternatives.push({
title: description,
value: {
property_name: schema_item.property_name,
......@@ -409,7 +409,7 @@
});
}
}
return type_arr;
return schema_alternatives;
})
.push(function (schema_alternatives) {
var scope = Math.random().toString(36).substr(2, 9);
......
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