summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-08-19 16:53:52 +0300
committerAlon Levy <alon@pobox.com>2014-08-19 16:53:52 +0300
commit6adb845c61c3e899878d303a1538dac52c13267e (patch)
tree477b8f4074d6f494cbeda2068db6b1378c4be3b5 /scripts
parente62c3579a2985d1f4384cc7c0c5e2a22a3b6e00c (diff)
Issue #46: save URL
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rhizicore.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js
index 87079986..1feafa31 100644
--- a/scripts/rhizicore.js
+++ b/scripts/rhizicore.js
@@ -275,6 +275,13 @@ function myGraph(el) {
}
}
+ this.editURL = function(id, state, url) {
+ var index = findNode(id, state);
+ if ((index === undefined)) return;
+ index.url = url;
+ update();
+ }
+
this.editState = function(id, state, newstate) {
var index = findNode(id.toLowerCase(), state);
if ((index !== undefined)) {
@@ -910,14 +917,18 @@ function showInfo(d, i) {
$('#edittype').val(d.type);
+ $('#editurl').val(d.url);
+
if (d.type === "deliverable") {
$('#editstartdate').val(d.start);
$('#editenddate').val(d.end);
}
$("#editbox").submit(function() {
- if (d.type === "deliverable") graph.editDates(d.id, null, new Date($("#editstartdate").val()), new Date($("#editenddate").val()));
+ if (d.type === "deliverable")
+ graph.editDates(d.id, null, new Date($("#editstartdate").val()), new Date($("#editenddate").val()));
graph.editType(d.id,d.type,$('#edittype').val());
+ graph.editURL(d.id, d.type, $('#editurl').val());
graph.update();
return false;
});