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

make code better understandable

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