summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-26 17:39:45 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-09-26 17:39:45 +0200
commitcb2d1c90d7cf47af91bdbb841cc137125e64b23e (patch)
tree9a361665d0e3aaf2f5fa1bcaf6538decdf9cb043
parent7478671d674b99fc0e5a583660a52675a411e797 (diff)
downloadChimère-cb2d1c90d7cf47af91bdbb841cc137125e64b23e.tar.bz2
Chimère-cb2d1c90d7cf47af91bdbb841cc137125e64b23e.zip
Display a message when no category are displayed (refs #4121)
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js
index 028f5c2..64f18e0 100644
--- a/chimere/static/chimere/js/jquery.chimere.js
+++ b/chimere/static/chimere/js/jquery.chimere.js
@@ -18,6 +18,8 @@ See the file COPYING for details.
var extra_url;
+var no_marker_message = "There is no element in this category of information yet! Feel free to contribute.";
+
var labels = {
'routing_from': "From",
'routing_to': "To",
@@ -25,7 +27,8 @@ var labels = {
'routing_clean': "Delete the route",
'center_map': "Center map here",
'zoom_in': "Zoom in",
- 'zoom_out': "Zoom out"
+ 'zoom_out': "Zoom out",
+ 'no_marker_message': "There is no element in this category of information yet! Feel free to contribute."
};
if (typeof language != 'undefined'){
@@ -37,7 +40,8 @@ if (typeof language != 'undefined'){
'routing_clean': "Effacer l'itinéraire",
'center_map': "Centrer la carte ici",
'zoom_in': "Zoom avant",
- 'zoom_out': "Zoom arrière"
+ 'zoom_out': "Zoom arrière",
+ 'no_marker_message': "Il n'y a pas encore d'élément dans cette catégorie d'information ! N'hésitez pas à contribuer."
};
}
@@ -1681,7 +1685,10 @@ function transformCoordToLonLat(coord) {
if (settings[map_id].enable_clustering){
methods.reinitClustering(map_id);
}
- if (!data.features) data.features = [];
+ if (!data.features){
+ data.features = [];
+ if (ids != '0') methods.displayMessage(labels['no_marker_message']);
+ }
if (data.zoom_need_reload){
settings[map_id]._zoom_need_reload = data.zoom_need_reload;
}