notifications on tile layer add/remove
parent
71b0715058
commit
0700102c57
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- save/restore current tile layer
|
- save/restore current tile layer
|
||||||
- integration in "Files" and "File sharing" context menu for .gpx files
|
- integration in "Files" and "File sharing" context menu for .gpx files
|
||||||
[#11](https://gitlab.com/eneiluj/gpxedit-oc/issues/11) @rugk
|
[#11](https://gitlab.com/eneiluj/gpxedit-oc/issues/11) @rugk
|
||||||
|
- notifications on tile layer add/remove
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -967,8 +967,14 @@ function deleteTileServer(li){
|
||||||
}
|
}
|
||||||
gpxedit.activeLayers.removeLayer(gpxedit.baseLayers[sname]);
|
gpxedit.activeLayers.removeLayer(gpxedit.baseLayers[sname]);
|
||||||
delete 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(){
|
}).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'});
|
{maxZoom: 18, attribution: 'custom tile server'});
|
||||||
gpxedit.activeLayers.addBaseLayer(newlayer, sname);
|
gpxedit.activeLayers.addBaseLayer(newlayer, sname);
|
||||||
gpxedit.baseLayers[sname] = newlayer;
|
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(){
|
}).always(function(){
|
||||||
|
}).fail(function(){
|
||||||
|
OC.Notification.showTemporary(t('gpxedit', 'Failure on tile server "{ts}" addition', {ts: sname}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue