diff options
| -rw-r--r-- | res/templates/index.html | 1 | ||||
| -rw-r--r-- | src/client/view/selection.js | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/res/templates/index.html b/res/templates/index.html index a1151228..04676ec7 100644 --- a/res/templates/index.html +++ b/res/templates/index.html @@ -71,6 +71,7 @@ var RZ_VERSION = '{% include "fragment/version.txt" %}'; <div class="input-container" id="input-container__search"> <input class="input-bar" tabindex="1" id="search" placeholder="Search for nodes or links"/> <button tabindex="-1" id="btn_search"></button> + <div id="selection-count"></div> <div id="search-suggestion" class="suggestion" style="display: none"></div> </div> <div class="input-container" id="input-container__graph-input"> diff --git a/src/client/view/selection.js b/src/client/view/selection.js index 6a7fa01f..32d3230c 100644 --- a/src/client/view/selection.js +++ b/src/client/view/selection.js @@ -1,7 +1,8 @@ define(['Bacon', 'jquery', 'underscore', 'messages'], function(Bacon, $, _, messages) { -var rz_core; // circular dependency, see get_rz_core +var rz_core, // circular dependency, see get_rz_core + selection_count_element = $('#selection-count'); function list_from_list_like(list_like) { @@ -115,6 +116,7 @@ function updateSelectedNodesBus(nodes, new_selected_nodes) root_nodes__by_id = nodes_to_id_dict(nodes); selected_nodes = new_selected_nodes; selected_nodes__by_id = nodes_to_id_dict(selected_nodes); + selection_count_element.text(selected_nodes.length > 0 ? '' + nodes.length + ', ' + selected_nodes.length : ''); selectionChangedBus.push(new_selection(selected_nodes, root_nodes)); } |
