diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c5b15..61ccd6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - show animation during exporting and saving - show saving/loading ajax percentage - save/restore tilelayer +- animations when add/remove tile servers +- few french translations ### Changed diff --git a/js/gpxedit.js b/js/gpxedit.js index b0c817e..bdbd690 100644 --- a/js/gpxedit.js +++ b/js/gpxedit.js @@ -932,7 +932,7 @@ function loadFile(file){ clear(); } if (response.gpx === ''){ - alert('The file does not exist or it is not a gpx'); + OC.dialogs.alert('The file does not exist or it is not supported', 'Load error'); } else{ parseGpx(response.gpx); @@ -959,7 +959,7 @@ function deleteTileServer(li){ }).done(function (response) { //alert(response.done); if (response.done){ - li.remove(); + li.fadeOut('slow', function() { li.remove(); }); var activeLayerName = gpxedit.activeLayers.getActiveBaseLayer().name; // if we delete the active layer, first select another if (activeLayerName === sname){ @@ -976,7 +976,11 @@ function addTileServer(){ var sname = $('#tileservername').val(); var surl = $('#tileserverurl').val(); if (sname === '' || surl === ''){ - alert('Server name or server url should not be empty'); + OC.dialogs.alert(t('gpxedit','Server name or server url should not be empty'), t('gpxedit','Impossible to add tile server')); + return; + } + if ($('#tileserverlist ul li[name="'+sname+'"]').length > 0){ + OC.dialogs.alert(t('gpxedit','A server with this name already exists'), t('gpxedit','Impossible to add tile server')); return; } $('#tileservername').val(''); @@ -996,10 +1000,12 @@ function addTileServer(){ //alert(response.done); if (response.done){ $('#tileserverlist ul').prepend( - '