diff options
author | zsloan | 2020-06-17 13:10:11 -0500 |
---|---|---|
committer | zsloan | 2020-06-17 13:10:11 -0500 |
commit | ccae8abe246af7b8f27fbcb9a37a3d242e594126 (patch) | |
tree | 014aba9a693a2d656f5709c227ca6592e4eb6898 | |
parent | a302a2b0ac0e7c0f26a0d063c3f2b057f61d47f1 (diff) | |
download | genenetwork2-ccae8abe246af7b8f27fbcb9a37a3d242e594126.tar.gz |
Fixed issue where removing traits and then running a tool from collection page still included the removed traits
-rw-r--r-- | wqflask/wqflask/collect.py | 5 | ||||
-rw-r--r-- | wqflask/wqflask/templates/collections/view.html | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 4fb8e69b..e8459821 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -159,13 +159,10 @@ def remove_traits(): uc_id = params['uc_id'] traits_to_remove = params.getlist('traits[]') traits_to_remove = process_traits(traits_to_remove) - logger.debug("\n\n after processing, traits_to_remove:", traits_to_remove) members_now = g.user_session.remove_traits_from_collection(uc_id, traits_to_remove) - # We need to return something so we'll return this...maybe in the future - # we can use it to check the results - return str(len(members_now)) + return redirect(url_for("view_collection", uc_id=uc_id)) @app.route("/collections/delete", methods=('POST',)) diff --git a/wqflask/wqflask/templates/collections/view.html b/wqflask/wqflask/templates/collections/view.html index 60a1a081..ec0e0220 100644 --- a/wqflask/wqflask/templates/collections/view.html +++ b/wqflask/wqflask/templates/collections/view.html @@ -80,7 +80,7 @@ <input type="text" id="searchbox" class="form-control" style="width: 200px; display: inline; padding-bottom: 9px;" placeholder="Search Table For ..."> <input type="text" id="select_top" class="form-control" style="width: 200px; display: inline; padding-bottom: 9px;" placeholder="Select Top ..."> <button class="btn btn-default" id="deselect_all" type="button"><span class="glyphicon glyphicon-remove"></span> Deselect</button> - <button class="btn btn-danger" id="remove" disabled="disabled" type="button"><i class="icon-minus-sign"></i> Delete Rows</button> + <button id="remove" class="btn btn-danger" data-url="/collections/remove" disabled="disabled" type="button"><i class="icon-minus-sign"></i> Delete Rows</button> <button id="delete" class="btn btn-danger submit_special" data-url="/collections/delete" title="Delete this collection" > Delete Collection</button> </form> <div style="margin-top: 10px; margin-bottom: 5px;"> @@ -230,6 +230,11 @@ return submit_special(url) }); + $("#remove").on("click", function() { + url = $(this).data("url") + return submit_special(url) + }); + $("#change_collection_name").on("click", function() { if ($('input[name=new_collection_name]').css('display') == 'none') { $('input[name=new_collection_name]').css('display', 'inline'); |