Browse Source

Add Search button loading text.

opi 10 years ago
parent
commit
5a978363a0
2 changed files with 3 additions and 1 deletions
  1. 2 0
      assets/main.js
  2. 1 1
      index.html

+ 2 - 0
assets/main.js

@@ -27,6 +27,7 @@ $( document ).ready(function() {
     // Search sub form
     $('#search-btn').click(function(e){
         e.preventDefault();
+        var btn = $(this).button('loading');
 
         // Geocoding
         var searchString = $('#search').val();
@@ -57,6 +58,7 @@ $( document ).ready(function() {
                 $('#modal').modal('hide');
             });
 
+            btn.button('reset');
         }); // getJSON
 
     }); // Search sub form

+ 1 - 1
index.html

@@ -122,7 +122,7 @@ Un moyen de contact au moins est nécessaire
       <div class="form-group col-sm-6">
         <div class="form-group form-group-lg form-inline">
           <input type="text" name="search" id="search" placeholder="rue du calvaire, nantes" class="form-control" />
-          <span id="search-btn" class="btn btn-default btn-lg">Recherche</span>
+          <span id="search-btn" class="btn btn-default btn-lg" data-loading-text="...">Recherche</span>
 
           <div id="search-results" class=""></div>
           <p class="help-block">Déplacer le marqueur pour pointer précisément le bâtiment au besoin</p>