mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #8331 from janani-prasad/favbtn_toggle
Issue#8105: Make tool favourite query a toggle
This commit is contained in:
@@ -52,9 +52,17 @@ const ToolPanel = Backbone.View.extend({
|
||||
title: _l("Show favorites"),
|
||||
icon: "fa fa-star-o",
|
||||
onclick: e => {
|
||||
$("#tool-search-query")
|
||||
.val("#favorites")
|
||||
.trigger("change");
|
||||
const $search_query = $("#tool-search-query");
|
||||
const $header_btn = $(".panel-header-button");
|
||||
$header_btn.find(".fa").toggleClass("fa-star-o fa-star");
|
||||
$header_btn.tooltip("hide");
|
||||
if ($search_query.val().indexOf("#favorites") != -1) {
|
||||
$search_query.val("");
|
||||
$search_query.keyup();
|
||||
$header_btn.attr("title", "");
|
||||
} else {
|
||||
$search_query.val("#favorites").trigger("change");
|
||||
}
|
||||
}
|
||||
});
|
||||
panel_buttons.push(this.favorite_button);
|
||||
|
||||
Reference in New Issue
Block a user