Commit 700db8e7 authored by Jérome Perrin's avatar Jérome Perrin

cleanup fieldset

parent 422c6844
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
// Handlebars // Handlebars
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
// Precompile the templates while loading the first gadget instance // Precompile the templates while loading the first gadget instance
var i, gadget_klass = rJS(window), var gadget_klass = rJS(window),
source = gadget_klass.__template_element source = gadget_klass.__template_element
.getElementById("label-template") .getElementById("label-template")
.innerHTML, .innerHTML,
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
function addField(property_id, property_definition, value) { function addField(property_id, property_definition, value) {
var sub_gadget; var sub_gadget;
console.log("addField", property_id, property_definition, value); //console.log("addField", property_id, property_definition, value);
queue queue
.push(function () { .push(function () {
// XXX this is incorrect for recursive fieldsets. // XXX this is incorrect for recursive fieldsets.
...@@ -43,16 +43,6 @@ ...@@ -43,16 +43,6 @@
}) })
); );
//console.log("PD", property_definition);
if (property_definition.oneOf) {
// if we got a oneOf, then we use the first one that matches our
// data.
console.log(value);
for (i = 0; i < property_definition.oneOf.length; i += 1) {
console.log(property_definition.oneOf[i]);
};
}
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");
...@@ -87,7 +77,7 @@ ...@@ -87,7 +77,7 @@
if (node_id) { if (node_id) {
addField('id', {'type': 'string'}, node_id); addField('id', {'type': 'string'}, node_id);
} }
console.log(options.property_definition); //console.log(options.property_definition);
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 =
...@@ -107,10 +97,6 @@ ...@@ -107,10 +97,6 @@
return queue; return queue;
}) })
.declareMethod("notifyDataChanged", function () {
console.log("content changed");
})
// getContent of all subfields // getContent of all subfields
.declareMethod("getContent", function () { .declareMethod("getContent", function () {
var i, promise_list = [], gadget = this; var i, promise_list = [], gadget = this;
......
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