summaryrefslogtreecommitdiff
path: root/src/rz_core.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/rz_core.js')
-rw-r--r--src/rz_core.js19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/rz_core.js b/src/rz_core.js
index d8c549a6..ad6755b3 100644
--- a/src/rz_core.js
+++ b/src/rz_core.js
@@ -708,14 +708,19 @@ function tick(e) {
function showNodeInfo(d, i) {
view.node_info.show(d);
- view.node_info.on_submit(function() {
- if (d.type === "deliverable") {
- graph.editDates(d.id, null, new Date($("#editstartdate").val()), new Date($("#editenddate").val()));
+ view.node_info.on_submit(function(e, form) {
+ var old_type = d.type,
+ new_type = form.type;
+ if (d.type === "third-internship-proposal") {
+ graph.editDates(d.id, null, new Date(form.startdate), new Date(form.enddate));
+ }
+ graph.editName(d.id, form.name);
+ graph.editType(d.id, d.type, form.type);
+ graph.editURL(d.id, d.type, form.url);
+ graph.editStatus(d.id, d.type, form.status);
+ if (new_type != old_type) {
+ view.node_info.show(d);
}
- graph.editName(d.id, $('.info').find('#editformname').val());
- graph.editType(d.id, d.type,$('#edittype').val());
- graph.editURL(d.id, d.type, $('#editurl').val());
- graph.editStatus(d.id, d.type, $('#editstatus').val());
update_view__graph(true);
return false;
});