]> git.openstreetmap.org Git - rails.git/commitdiff
Disable the "add note" button in database offline mode
authorTom Hughes <tom@compton.nu>
Sun, 14 Dec 2014 00:27:31 +0000 (00:27 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 14 Dec 2014 00:27:31 +0000 (00:27 +0000)
app/assets/javascripts/leaflet.note.js

index c0f72af208eee184b3e0de58e0f2bcd3bb9216de..0df22eb57f479825aeec2a9515f032371934966e 100644 (file)
@@ -16,7 +16,7 @@ L.OSM.note = function (options) {
     update();
 
     function update() {
-      var disabled = map.getZoom() < 12;
+      var disabled = OSM.STATUS === "database_offline" || map.getZoom() < 12;
       link
         .toggleClass('disabled', disabled)
         .attr('data-original-title', I18n.t(disabled ?