diff options
author | zsloan | 2022-04-28 16:04:46 +0000 |
---|---|---|
committer | zsloan | 2022-05-10 19:39:27 +0000 |
commit | e35b21abb1b09d21eac1d69962588f5808a88a63 (patch) | |
tree | e6197a2cc6e831853cff184b5a4d3490dba5e322 /wqflask | |
parent | fcfa516000044bd93824ffb4d857866c58a7c193 (diff) | |
download | genenetwork2-e35b21abb1b09d21eac1d69962588f5808a88a63.tar.gz |
Add button for collection import and JS for submitting form
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/collections/list.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html index e6a1ec9b..fb3946fb 100644 --- a/wqflask/wqflask/templates/collections/list.html +++ b/wqflask/wqflask/templates/collections/list.html @@ -15,18 +15,20 @@ {% endif %} <div> - <form id="collections_form" action="/delete" method="post"> - <input type="hidden" name="uc_id" id="uc_id" value="" /> - </form> <button class="btn btn-default" id="select_all"><span class="glyphicon glyphicon-ok"></span> Select All</button> <button class="btn btn-default" id="deselect_all"><span class="glyphicon glyphicon-remove"></span> Deselect All</button> <button class="btn btn-default" id="invert"><span class="glyphicon glyphicon-resize-vertical"></span> Invert</button> <button class="btn btn-danger" id="remove_collections" data-url="/collections/delete">Remove Collections</button> <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline;" placeholder="Search This Table For ..."> <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ..."> + <br> + <form id="collections_form" action="/delete" method="post" enctype="multipart/form-data"> + <input type="hidden" name="uc_id" id="uc_id" value="" /> + <div style="margin-top: 10px; display: inline-block;"><button class="btn btn-default" id="import_collection" data-url="/collections/import"> Import Collection</button> <input type="file" name="import_file" id="import_file" size="20" style="display: inline-block;"></input></div> + </form> </div> <br> - <div id="collections_list" style="width:50%; margin-top: 20px; margin-bottom: 20px;"> + <div id="collections_list" style="width:50%; margin-top: 10px; margin-bottom: 10px;"> {% if collections|length > 0 %} <table class="table-hover table-striped cell-border" id='trait_table' style="float: left;"> <thead> @@ -116,6 +118,11 @@ return $("#collections_form").submit(); }; + $("#import_collection").on("click", function() { + url = $(this).data("url") + submit_special(url) + }); + $("#remove_collections").on("click", function() { url = $(this).data("url") collections = [] |