Skip to content
Snippets Groups Projects

F shortcuts with new panel

Merged Florian Spreckelsen requested to merge f-shortcuts-with-new-panel into dev
1 file
+ 14
4
Compare changes
  • Side-by-side
  • Inline
+ 14
4
@@ -291,18 +291,28 @@ var query_shortcuts = new function () {
);
// function for inserting the generated query string into the query panel
var insert_to_query_panel = (_) => {
var insert_to_query_panel = (inputSelectorName) => {
var values = query_shortcuts.extract_placeholder_values(shortcut_form[0]);
var replaced_query_string = query_shortcuts.replace_placeholders_with_values(query_string, values);
$("#caosdb-query-textarea")
$(inputSelectorName)
.focus()
.val(replaced_query_string);
return replaced_query_string;
};
// callback for the submission
var execute = (_) => {
insert_to_query_panel();
$("#caosdb-query-form").submit();
if ("${BUILD_MODULE_LEGACY_QUERY_FORM}" != "ENABLED") {
const queryString = insert_to_query_panel(".caosdb-f-query-form input");
window.localStorage.setItem("query.queryString", queryString);
$(".caosdb-f-query-panel form").submit()
} else {
insert_to_query_panel("#caosdb-query-textarea");
$("#caosdb-query-form").submit();
}
};
shortcut_form.find(".caosdb-f-query-shortcut-right-col")
Loading