- if (currentNote && map.hasLayer(currentNote)) map.removeLayer(currentNote);
-
- currentNote = L.marker(latLng, {
- icon: noteIcons[data.status],
- opacity: 1,
- interactive: true
- });
-
- map.addLayer(currentNote);
-
- if (callback) callback();
+ function updateButtons(form) {
+ $(form).find("button[type=submit]").prop("disabled", false);
+ if ($(form.text).val() === "") {
+ $(form.close).text($(form.close).data("defaultActionText"));
+ $(form.comment).prop("disabled", true);
+ } else {
+ $(form.close).text($(form.close).data("commentActionText"));
+ $(form.comment).prop("disabled", false);
+ }