Skip to content
Snippets Groups Projects
Commit 7522865b authored by florian's avatar florian
Browse files

FIX: Add button only if it doesn't exist

parent 89c02ba7
No related branches found
No related tags found
2 merge requests!47Release v0.4.0,!44ENH: Add all query results to bookmarks
...@@ -569,7 +569,12 @@ var ext_bookmarks = function ($, logger, config) { ...@@ -569,7 +569,12 @@ var ext_bookmarks = function ($, logger, config) {
* Add a button to add all query results to bookmarks. * Add a button to add all query results to bookmarks.
*/ */
const add_add_query_results_button = function () { const add_add_query_results_button = function () {
const button_html = $(`<div class="row"><p class="text-end">Bookmark all query results</p></div>`)[0]; const row_id = "caosdb-add-query-to-bookmarks-row"
// do nothing if already existing
if ($("#" + row_id).length > 0) {
return;
}
const button_html = $(`<div class="row" id=${row_id}><p class="text-end">Bookmark all query results</p></div>`)[0];
// Add to query results box // Add to query results box
$(".caosdb-query-response-heading").append(button_html); $(".caosdb-query-response-heading").append(button_html);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment