From 480d71d9e12878449f7526cacb644f686a9169af Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 26 Jan 2022 19:42:30 +0000 Subject: Added a comment explaining what the parseIndexString function does --- wqflask/wqflask/static/new/javascript/search_results.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js index a665e3d2..b7ad359f 100644 --- a/wqflask/wqflask/static/new/javascript/search_results.js +++ b/wqflask/wqflask/static/new/javascript/search_results.js @@ -93,6 +93,13 @@ $(function() { $('#trait_table').DataTable().search($(this).val()).draw(); }); + /** + * parseIndexString takes a string consisting of integers, + * hyphens, and/or commas to indicate range(s) of indices + * to select a rows and returns the corresponding set of indices + * For example - "1, 5-10, 15" would return a set of 8 rows + * @return {Set} The list of indices as a Set + */ parseIndexString = function(idx_string) { index_list = []; _ref = idx_string.split(","); -- cgit v1.2.3