mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2026-10-03 07:51:09 +00:00
Add error handling of invalid CQP queries
This commit is contained in:
1 parent
ef1eb9976e
commit
e04b31d282
3 files changed
+24
-7
No files matched your search
@@ -258,7 +258,17 @@
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
} else if (message === "CQI_CQP_ERROR_GENERAL") {
|
||||
queryResultsTableElement.classList.add("hide");
|
||||
let toast = M.toast({"classes": "red", "html": `<span>Invalid query entered!</span><button class="btn-flat toast-action white-text" data-action="close"><i class="material-icons">close</i></button>`});
|
||||
let toastActionElement = toast.el.querySelector(".toast-action[data-action='close']");
|
||||
if (toastActionElement) {
|
||||
toastActionElement.addEventListener("click", function() {
|
||||
toast.dismiss();
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var matchElement;
|
||||
var matchTextTitlesElement;
|
||||
|
||||
Reference in new issue
Block a user