.click(add)));
}
- function displayLoadError(message) {
+ function displayLoadError(message, close) {
$("#browse_status").html(
$("<div class='p-3'>").append(
- $("<h2 class='flex-grow-1 text-break'>")
- .text(I18n.t("browse.start_rjs.load_data")),
+ $("<div class='d-flex'>").append(
+ $("<h2 class='flex-grow-1 text-break'>")
+ .text(I18n.t("browse.start_rjs.load_data")),
+ $("<div>").append(
+ $("<button type='button' class='btn-close'>")
+ .attr("aria-label", I18n.t("javascripts.close"))
+ .click(close))),
$("<div>").append(
$("<div class='d-flex'>").append(
$("<p class='alert alert-warning'>")
/*
* Modern browsers are quite happy showing far more than 100 features in
- * the data browser, so increase the limit to 2000 by default, but keep
+ * the data browser, so increase the limit to 4000 by default, but keep
* it restricted to 500 for IE8 and 100 for older IEs.
*/
- var maxFeatures = 2000;
+ var maxFeatures = 4000;
/*@cc_on
if (navigator.appVersion < 8) {
dataLoader = null;
if (textStatus === "abort") { return; }
+ function closeError() {
+ $("#browse_status").empty();
+ }
+
if (XMLHttpRequest.status === 400 && XMLHttpRequest.responseText) {
- displayLoadError(XMLHttpRequest.responseText);
+ displayLoadError(XMLHttpRequest.responseText, closeError);
} else if (XMLHttpRequest.statusText) {
- displayLoadError(XMLHttpRequest.statusText);
+ displayLoadError(XMLHttpRequest.statusText, closeError);
} else {
- displayLoadError(String(XMLHttpRequest.status));
+ displayLoadError(String(XMLHttpRequest.status), closeError);
}
}
});