From 0c098c3a1d905046fa0531e51b5da5f2af982493 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 15 Jul 2020 19:10:59 +0200 Subject: [PATCH] Convert data feature warning to use bootstrap alert Also rearrange dialog to fit with standard sidebar layouts, so that the close icon and load buttons are not within the paragraph. There may be a better way to construct this! --- app/assets/javascripts/index/browse.js | 21 +++++++++++++-------- app/assets/stylesheets/common.scss | 4 ---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index 630944411..07ad64def 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -49,15 +49,20 @@ OSM.initializeBrowse = function (map) { function displayFeatureWarning(count, limit, add, cancel) { $("#browse_status").html( - $("

") - .text(I18n.t("browse.start_rjs.feature_warning", { num_features: count, max_features: limit })) - .prepend( - $("") - .click(cancel)) + $("
") .append( - $("") - .val(I18n.t("browse.start_rjs.load_data")) - .click(add))); + $("

") + .text(I18n.t("browse.start_rjs.load_data")) + .prepend($("").click(cancel))) + .append( + $("
") + .append( + $("

") + .text(I18n.t("browse.start_rjs.feature_warning", { num_features: count, max_features: limit }))) + .append( + $("") + .val(I18n.t("browse.start_rjs.load_data")) + .click(add)))); } var dataLoader; diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index e3b79c591..57c1d1617 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -699,10 +699,6 @@ body.compact { } #browse_status { - p { - padding: $lineheight; - } - input { display: block; margin-left: auto; -- 2.39.5