Commit 01f52c21 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

static updates to new working version

parent 90071f7d
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Choose Instance</title> <title>Choose Instance</title>
<link rel="stylesheet" href="inputModule_viewAddInstanceDefinitionDialog.css" /> <link rel="stylesheet" href="InputModule_viewAddInstanceDefinitionDialog.css" />
<script src="../lib/rsvp.min.js" type="text/javascript"></script> <script src="../lib/rsvp.min.js" type="text/javascript"></script>
<script src="../lib/handlebars.min.js" type="text/javascript"></script> <script src="../lib/handlebars.min.js" type="text/javascript"></script>
......
...@@ -41,6 +41,10 @@ ...@@ -41,6 +41,10 @@
} }
return gadget.declareGadget("../expandable_field/index.html"); return gadget.declareGadget("../expandable_field/index.html");
} }
if (property_definition.properties) {
// Create a recursive fieldset for this key.
return gadget.declareGadget("../fieldset/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");
...@@ -73,16 +77,19 @@ ...@@ -73,16 +77,19 @@
}, node_id); }, node_id);
} }
Object.keys(options.property_definition.properties).forEach(function(property_name) { Object.keys(options.property_definition.properties).forEach(function(property_name) {
var property_definition = options.property_definition.properties[property_name], value = property_definition.default, i = 0, property; var property_definition = options.property_definition.properties[property_name], value, i = 0, property;
if (property_definition.allOf) { if (property_definition) {
if (property_definition.allOf[0].properties) { value = property_definition.default || {};
for (property in property_definition.allOf[0].properties) { if (property_definition.allOf) {
if (property_definition.allOf[0].properties.hasOwnProperty(property)) { if (property_definition.allOf[0].properties) {
i += 1; for (property in property_definition.allOf[0].properties) {
if (i > 1) { if (property_definition.allOf[0].properties.hasOwnProperty(property)) {
console.log("something is wrong!"); i += 1;
if (i > 1) {
console.log("something is wrong!");
}
value = property_definition.allOf[0].properties[property].default;
} }
value = property_definition.allOf[0].properties[property].default;
} }
} }
} }
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
</script> </script>
<template id="popup-edit-template"> <template id="popup-edit-template">
<div id="node-edit-popup" data-position-to="origin"> <div id="edit-popup" data-position-to="origin">
<div data-role="header" data-theme="a"> <div data-role="header" data-theme="a">
<h1 class="node_class">Node edition</h1> <h1 class="node_class">Edit properties</h1>
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a> <a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
</div> </div>
<br/> <br/>
......
This diff is collapsed.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"Example.Edge": { "Example.Edge": {
_class: "edge", _class: "edge",
allOf: [ { allOf: [ {
$ref: "#edge" $ref: "#/edge"
}, { }, {
properties: { properties: {
color: { color: {
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
"Example.Node": { "Example.Node": {
_class: "node", _class: "node",
allOf: [ { allOf: [ {
$ref: "#node" $ref: "#/node"
}, { }, {
properties: { properties: {
shape: { shape: {
......
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