.append($("<a class='btn btn-primary'>")
.attr("for", "embed_html")
.attr("id", "embed_link")
+ .attr("data-bs-title", I18n.t("javascripts.site.embed_html_disabled"))
.attr("href", "#")
.text(I18n.t("javascripts.share.embed")))
.on("click", "a", function (e) {
e.preventDefault();
+ if (!$(this).hasClass("btn-primary")) return;
var id = "#" + $(this).attr("for");
$(this).siblings("a")
.removeClass("active");
params.marker = latLng.lat + "," + latLng.lng;
}
- $("#embed_link").toggleClass("disabled", !canEmbed);
+ $("#embed_link")
+ .toggleClass("btn-primary", canEmbed)
+ .toggleClass("btn-secondary", !canEmbed)
+ .tooltip(canEmbed ? "disable" : "enable");
if (!canEmbed && $("#embed_link").hasClass("active")) {
$("#long_link").click();
}
map_data_zoom_in_tooltip: Zoom in to see map data
queryfeature_tooltip: Query features
queryfeature_disabled_tooltip: Zoom in to query features
+ embed_html_disabled: HTML embedding is not available for this map layer
changesets:
show:
comment: "Comment"