diff --git a/CHANGELOG.md b/CHANGELOG.md index b6bb94e..be317e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - save/restore current tile layer - integration in "Files" and "File sharing" context menu for .gpx files [#11](https://gitlab.com/eneiluj/gpxedit-oc/issues/11) @rugk +- notifications on tile layer add/remove ### Changed diff --git a/js/gpxedit.js b/js/gpxedit.js index cc3745b..a49b2c1 100644 --- a/js/gpxedit.js +++ b/js/gpxedit.js @@ -967,8 +967,14 @@ function deleteTileServer(li){ } gpxedit.activeLayers.removeLayer(gpxedit.baseLayers[sname]); delete gpxedit.baseLayers[sname]; + OC.Notification.showTemporary(t('gpxedit', 'Tile server "{ts}" has been deleted', {ts: sname})); + } + else{ + OC.Notification.showTemporary(t('gpxedit', 'Failure on tile server "{ts}" deletion', {ts: sname})); } }).always(function(){ + }).fail(function(){ + OC.Notification.showTemporary(t('gpxedit', 'Failure on tile server "{ts}" deletion', {ts: sname})); }); } @@ -1011,8 +1017,14 @@ function addTileServer(){ {maxZoom: 18, attribution: 'custom tile server'}); gpxedit.activeLayers.addBaseLayer(newlayer, sname); gpxedit.baseLayers[sname] = newlayer; + OC.Notification.showTemporary(t('gpxedit', 'Tile server "{ts}" has been added', {ts: sname})); + } + else{ + OC.Notification.showTemporary(t('gpxedit', 'Failure on tile server "{ts}" addition', {ts: sname})); } }).always(function(){ + }).fail(function(){ + OC.Notification.showTemporary(t('gpxedit', 'Failure on tile server "{ts}" addition', {ts: sname})); }); }