]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/user.js
Merge pull request #1588 from Georeactor/master
[rails.git] / app / assets / javascripts / user.js
index e8ad3324d0ccc2b01e5a4e3b388b39f0d47f6603..44872a78c6f12c2432df5fa40f268406b0109c30 100644 (file)
@@ -12,14 +12,25 @@ $(document).ready(function () {
     L.OSM.zoom({position: position})
       .addTo(map);
 
-    L.control.locate({
+    var locate = L.control.locate({
       position: position,
+      icon: 'icon geolocate',
+      iconLoading: 'icon geolocate',
       strings: {
         title: I18n.t('javascripts.map.locate.title'),
         popup: I18n.t('javascripts.map.locate.popup')
       }
     }).addTo(map);
 
+    var locateContainer = locate.getContainer();
+
+    $(locateContainer)
+      .removeClass('leaflet-control-locate leaflet-bar')
+      .addClass('control-locate')
+      .children("a")
+      .removeClass('leaflet-bar-part leaflet-bar-part-single')
+      .addClass('control-button');
+
     if (OSM.home) {
       map.setView([OSM.home.lat, OSM.home.lon], 12);
     } else {
@@ -92,4 +103,20 @@ $(document).ready(function () {
   } else {
     enableAuth();
   }
+
+  $("#user_all").change(function () {
+    $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked"));
+  });
+
+  $("#content.user_confirm").each(function () {
+    $(this).hide();
+    $(this).find("#confirm").submit();
+  });
+
+  $("input[name=legale]").change(function () {
+    var url = $(this).data("url");
+
+    $("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
+    $("#contributorTerms").load(url);
+  });
 });