mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-30 18:13:23 +08:00
Issue#8105: Make tool favourite query a toggle - The favourite button has been changed to toggle between clearing the search and showing the favourites
This commit is contained in:
@@ -52,9 +52,21 @@ const ToolPanel = Backbone.View.extend({
|
||||
title: _l("Show favorites"),
|
||||
icon: "fa fa-star-o",
|
||||
onclick: e => {
|
||||
$("#tool-search-query")
|
||||
.val("#favorites")
|
||||
.trigger("change");
|
||||
$(".panel-header-button .fa").toggleClass("fa-star-o fa-star");
|
||||
//hide the tooltip
|
||||
$(".panel-header-button").tooltip('hide');
|
||||
if($("#tool-search-query").val().indexOf("#favorites")!= -1)
|
||||
{
|
||||
$("#tool-search-query").val("");
|
||||
$("#tool-search-query").keyup();
|
||||
$(".panel-header-button").attr("title","");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#tool-search-query")
|
||||
.val("#favorites")
|
||||
.trigger("change");
|
||||
}
|
||||
}
|
||||
});
|
||||
panel_buttons.push(this.favorite_button);
|
||||
|
||||
Reference in New Issue
Block a user