Commit b4d52192 authored by Boris Kocherov's avatar Boris Kocherov

make code better understandable

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