X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/281dc29c5c9e3c4c7d0df786df56e46f27541d22..4ed7387551b328a712959098a2eeeadf128ff225:/app/assets/javascripts/leaflet.note.js
diff --git a/app/assets/javascripts/leaflet.note.js b/app/assets/javascripts/leaflet.note.js
index 0df22eb57..5f8010967 100644
--- a/app/assets/javascripts/leaflet.note.js
+++ b/app/assets/javascripts/leaflet.note.js
@@ -2,28 +2,28 @@ L.OSM.note = function (options) {
var control = L.control(options);
control.onAdd = function (map) {
- var $container = $('
')
- .attr('class', 'control-note');
+ var $container = $("
")
+ .attr("class", "control-note");
- var link = $('
')
- .attr('class', 'control-button')
- .attr('href', '#')
- .html('')
+ var link = $("")
+ .attr("class", "control-button")
+ .attr("href", "#")
+ .html("")
.appendTo($container);
- map.on('zoomend', update);
-
- update();
+ map.on("zoomend", update);
function update() {
var disabled = OSM.STATUS === "database_offline" || map.getZoom() < 12;
link
- .toggleClass('disabled', disabled)
- .attr('data-original-title', I18n.t(disabled ?
- 'javascripts.site.createnote_disabled_tooltip' :
- 'javascripts.site.createnote_tooltip'));
+ .toggleClass("disabled", disabled)
+ .attr("data-bs-original-title", I18n.t(disabled ?
+ "javascripts.site.createnote_disabled_tooltip" :
+ "javascripts.site.createnote_tooltip"));
}
+ update();
+
return $container[0];
};