1
0
Fork 0

graph management

This commit is contained in:
scottashton 2014-06-24 16:02:40 +02:00
parent 3cc95a23fd
commit e4f23d2b23
2 changed files with 41 additions and 3 deletions

View File

@ -6,7 +6,7 @@
mandatory = '*';
}
%>
<tr>
<tr class="tableRow" id="<%='row_' + row.id%>">
<th class="collectionTh"><%=row.label%><%=mandatory%>:</th>
<th class="collectionTh">
<%

View File

@ -47,6 +47,7 @@
graphs: this.collection,
searchString : ''
}));
this.events["click .tableRow"] = this.showHideDefinition.bind(this);
return this;
},
@ -264,6 +265,16 @@
window.modalView.show("modalTable.ejs", "Graph Properties", buttons, tableContent);
},
showHideDefinition : function(e) {
var id = $(e.currentTarget).attr("id");
if (id == "row_newEdgeDefinitions1") {
$('#row_fromCollections1').toggle();
$('#row_toCollections1').toggle();
}
},
createNewGraphModal2: function() {
var buttons = [],
tableContent = [];
@ -278,9 +289,10 @@
true
)
);
tableContent.push(
window.modalView.createTextEntry(
"newEdgeDefinitions",
"newEdgeDefinitions1",
"Edge definitions",
"",
"Some info for edge definitions",
@ -288,6 +300,29 @@
true
)
);
tableContent.push(
window.modalView.createSelect2Entry(
"fromCollections1",
"fromCollections",
"",
"The collection that contain the start vertices of the relation.",
"",
true
)
);
tableContent.push(
window.modalView.createSelect2Entry(
"toCollections1",
"toCollections",
"",
"The collection that contain the end vertices of the relation.",
"",
true
)
);
tableContent.push(
window.modalView.createSelect2Entry(
"newVertexCollections",
@ -302,7 +337,10 @@
window.modalView.createSuccessButton("Create", this.createNewGraph.bind(this))
);
window.modalView.show("modalTable.ejs", "Add new Graph", buttons, tableContent);
window.modalView.show("modalTable.ejs", "Add new Graph", buttons, tableContent, null, this.events);
$('#row_fromCollections1').hide();
$('#row_toCollections1').hide();
},
createEditGraphModal2: function(name, vertices, edges) {