diff options
| author | Alon Levy <alon@pobox.com> | 2015-02-15 18:14:26 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-02-15 18:42:11 +0200 |
| commit | 1b4aff6486789897ab486df271b12698a115e497 (patch) | |
| tree | d7d48185fe50313d5a7712e10d628207d03aa936 /src/client | |
| parent | adc5d3b1d25aaf405e05bc4d4f4c8dc3638768aa (diff) | |
client/node_info: show message on delete/change of open dialog underlying node (informational only)
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/view/node_info.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/view/node_info.js b/src/client/view/node_info.js index e22446a3..3c0384fb 100644 --- a/src/client/view/node_info.js +++ b/src/client/view/node_info.js @@ -3,6 +3,7 @@ function($, _unused_jquery_ui, util, view_helpers, internal, model_d var d = null, msg_node = $('.info-card-message'), + graph, node, setup_done = false; @@ -30,6 +31,11 @@ function _get_form_data() { }; } +function commit() +{ + graph.update_node(node, _get_form_data()); +} + function textarea_resize(text, max) { var height; @@ -58,7 +64,7 @@ function setup_click_handlers(graph) $('#edit-node-dialog__save').on('click', function (e) { e.preventDefault(); hide(); - graph.update_node(node, _get_form_data()); + commit(); }); // re-open dialog on node updates while it is open diffBusUnsubscribe = graph.diffBus.onValue(function (diff) { @@ -76,7 +82,7 @@ function setup_click_handlers(graph) function warning(string) { - msg_node.val(string); + msg_node.text(string); } function show(graph, d) { @@ -96,6 +102,7 @@ function show(graph, d) { util.assert(graph.find_node__by_id(d.id) != null); node = d; + graph = graph; setup_click_handlers(graph); |
