Commit b4d52192 authored by Boris Kocherov's avatar Boris Kocherov

make code better understandable

parent 795f8518
...@@ -841,7 +841,7 @@ ...@@ -841,7 +841,7 @@
}); });
} }
function render_field(gadget, key, path, schema_arr, json_document, root, options) { function render_field(gadget, property_name, path, schema_arr, json_document, root, options) {
var type, var type,
div, div,
delete_button, delete_button,
...@@ -870,8 +870,8 @@ ...@@ -870,8 +870,8 @@
options = options || {}; options = options || {};
type = options.type; type = options.type;
if (path && key) { if (path && property_name) {
first_path = path + encodeJsonPointer(key); first_path = path + encodeJsonPointer(property_name);
} else { } else {
first_path = ""; first_path = "";
} }
...@@ -916,7 +916,7 @@ ...@@ -916,7 +916,7 @@
if (schema.description) { if (schema.description) {
div.title = schema.description; div.title = schema.description;
} }
// if (key && !first_path) { // if (property_name && !first_path) {
if (options.delete_button === true) { if (options.delete_button === true) {
delete_button = createElement("span", delete_button = createElement("span",
{"class": "ui-btn-icon-top ui-icon-trash-o"} {"class": "ui-btn-icon-top ui-icon-trash-o"}
...@@ -936,7 +936,7 @@ ...@@ -936,7 +936,7 @@
} }
} }
label_text = [key, schema_ob.title] label_text = [property_name, schema_ob.title]
.filter(function (v) { return v; }) .filter(function (v) { return v; })
.join(" ") .join(" ")
// use non-breaking hyphen // use non-breaking hyphen
......
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