fieldset; correction needed after rebase

parent e01fe793
/*global rJS, RSVP, jQuery, Handlebars, /*global rJS, RSVP, jQuery, Handlebars,
promiseEventListener, initGadgetMixin*/ promiseEventListener, initGadgetMixin, console */
/*jslint nomen: true */ /*jslint nomen: true */
(function (window, rJS, RSVP, Handlebars, initGadgetMixin) { (function (window, rJS, RSVP, Handlebars, initGadgetMixin) {
"use strict"; "use strict";
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
delete property_definition.allOf[0].type; delete property_definition.allOf[0].type;
} }
return gadget.declareGadget("../expandable_field/index.html"); return gadget.declareGadget("../expandable_field/index.html");
}
if (property_definition.type === "object") { if (property_definition.type === "object") {
// Create a recursive fieldset for this key. // Create a recursive fieldset for this key.
return gadget.declareGadget("../fieldset/index.html"); return gadget.declareGadget("../fieldset/index.html");
...@@ -89,21 +90,18 @@ ...@@ -89,21 +90,18 @@
if (node_id) { if (node_id) {
addField('id', {'type': 'string'}, node_id); addField('id', {'type': 'string'}, node_id);
} }
Object.keys(options.property_definition.properties Object.keys(options.property_definition.properties)
).forEach(function (property_name) { .forEach(function (property_name) {
var property_definition = var property_definition =
options.property_definition.properties[property_name], options.property_definition.properties[property_name],
value = property_definition.default, value = property_definition.default,
i=0, property; i=0, property;
// XXX some properties are not editable
if (property_name !== 'coordinate' && property_name !== '_class') {
addField(property_name, property_definition, value);
if (property_definition.allOf) { if (property_definition.allOf) {
if (property_definition.allOf[0].properties) { if (property_definition.allOf[0].properties) {
for (property in property_definition for (property in property_definition
.allOf[0].properties) { .allOf[0].properties) {
if (property_definition.allOf[0].properties if (property_definition.allOf[0]
.hasOwnProperty(property)) { .properties.hasOwnProperty(property)) {
i += 1; i += 1;
if (i > 1) {console.log("something is wrong!");} if (i > 1) {console.log("something is wrong!");}
value = property_definition.allOf[0] value = property_definition.allOf[0]
...@@ -128,7 +126,6 @@ ...@@ -128,7 +126,6 @@
}); });
return queue; return queue;
}) })
// getContent of all subfields // getContent of all subfields
.declareMethod("getContent", function () { .declareMethod("getContent", function () {
console.log("GET CONTENT SIMPLE FIELDSET"); console.log("GET CONTENT SIMPLE FIELDSET");
......
...@@ -596,7 +596,9 @@ ...@@ -596,7 +596,9 @@
gadget.props.data.class_definition[node_data._class], gadget.props.data.class_definition[node_data._class],
gadget.props.data gadget.props.data
); );
console.log("----schema----");
console.log(schema);
console.log("----schema----");
if (node_edit_popup.length !== 0) { if (node_edit_popup.length !== 0) {
node_edit_popup.remove(); node_edit_popup.remove();
} }
...@@ -606,7 +608,6 @@ ...@@ -606,7 +608,6 @@
); );
node_edit_popup = $(gadget.props.element).find('#edit-popup'); node_edit_popup = $(gadget.props.element).find('#edit-popup');
console.log("openNODEDIALOG 1.3"); console.log("openNODEDIALOG 1.3");
console.log("openNODEDIALOG 1.35");
console.log(node_edit_popup); console.log(node_edit_popup);
console.log(node_edit_popup.find(".node_class")); console.log(node_edit_popup.find(".node_class"));
console.log(gadget.props.data.graph.node); console.log(gadget.props.data.graph.node);
......
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