X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/51dcf86f40200bf4728097868f45aa2fe12968f3..9f025130fddd7b9c7314cfec36dbe160c41e6698:/app/assets/javascripts/index/notes.js.erb diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 47a2dc200..4594f1c78 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -41,7 +41,7 @@ $(document).ready(function () { }); map.on("popupclose", function (e) { - if (e.popup == newNote._popup) { + if (newNote && e.popup == newNote._popup) { $(newNote).oneTime(10, "removenote", function () { map.removeLayer(newNote); }); @@ -145,10 +145,10 @@ $(document).ready(function () { var form = e.target.form; if ($(e.target).val() == "") { - $(form.close).val(I18n.t("javascripts.notes.show.close")); + $(form.close).val(I18n.t("javascripts.notes.show.resolve")); $(form.comment).prop("disabled", true); } else { - $(form.close).val(I18n.t("javascripts.notes.show.comment_and_close")); + $(form.close).val(I18n.t("javascripts.notes.show.comment_and_resolve")); $(form.comment).prop("disabled", false); } });