mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Add error handling of invalid CQP queries
This commit is contained in:
@ -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