Projet

Général

Profil

0001-misc-add-uniform-error-handling-for-geolocation-erro.patch

Frédéric Péters, 02 décembre 2015 11:15

Télécharger (1,73 ko)

Voir les différences:

Subject: [PATCH] misc: add uniform error handling for geolocation errors
 (#9170)

 wcs/qommon/static/js/qommon.geolocation.js | 2 ++
 wcs/qommon/static/js/qommon.map.js         | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
wcs/qommon/static/js/qommon.geolocation.js
180 180
        },
181 181
        function (error_msg) {
182 182
          $('div[data-geolocation] label').removeClass('activity');
183
          $($('div[data-geolocation] label')[0]).after(
184
                          '<span class="geoloc-error">' + error_msg.message + '</span>');
183 185
        });
184 186
    }
185 187
  }
wcs/qommon/static/js/qommon.map.js
59 59
       });
60 60
       map.on('locationerror', function(e) {
61 61
         $map_widget.parent().parent().find('label').removeClass('activity');
62
         $map_widget.parent().parent().find('label').after('<span class="geoloc">' + e.message + '</span>');
62
         $map_widget.parent().parent().find('label').after('<span class="geoloc-error">' + e.message + '</span>');
63 63
       });
64 64
       $map_widget.parent().parent().find('label').addClass('activity')
65 65
       map.locate({timeout: 10000, maximumAge: 60000});
66
-