- function displayFeatureWarning(count, limit, callback) {
- clearStatus();
-
- var div = document.createElement("div");
-
- var p = document.createElement("p");
- p.appendChild(document.createTextNode(I18n.t("browse.start_rjs.loaded_an_area_with_num_features", { num_features: count, max_features: limit })));
- div.appendChild(p);
-
- var input = document.createElement("input");
- input.type = "submit";
- input.value = I18n.t('browse.start_rjs.load_data');
- input.onclick = callback;
- div.appendChild(input);
-
- $("#browse_content").html("");
- $("#browse_content").append(div);
+ function displayFeatureWarning(count, limit, add, cancel) {
+ $("#browse_status").html(
+ $("<div>")
+ .append(
+ $("<h2>")
+ .text(I18n.t("browse.start_rjs.load_data"))
+ .prepend($("<span class='icon close'></span>").click(cancel)))
+ .append(
+ $("<div class='inner12'>")
+ .append(
+ $("<p class='alert alert-warning clearfix'></p>")
+ .text(I18n.t("browse.start_rjs.feature_warning", { num_features: count, max_features: limit })))
+ .append(
+ $("<input type='submit'>")
+ .val(I18n.t("browse.start_rjs.load_data"))
+ .click(add))));