aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorzsloan2022-01-26 19:42:30 +0000
committerzsloan2022-01-27 13:45:09 -0600
commit480d71d9e12878449f7526cacb644f686a9169af (patch)
treece256d25b0186be7075718b1149203f9960268ef /wqflask
parent6ab213921932d904c64c8b37a327a971a3c46cfc (diff)
downloadgenenetwork2-480d71d9e12878449f7526cacb644f686a9169af.tar.gz
Added a comment explaining what the parseIndexString function does
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js7
1 files changed, 7 insertions, 0 deletions
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(",");