summaryrefslogtreecommitdiff
path: root/chimere/static
diff options
context:
space:
mode:
Diffstat (limited to 'chimere/static')
-rw-r--r--chimere/static/chimere/js/base.js4
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js9
2 files changed, 10 insertions, 3 deletions
diff --git a/chimere/static/chimere/js/base.js b/chimere/static/chimere/js/base.js
index fd1158a..0cf3f35 100644
--- a/chimere/static/chimere/js/base.js
+++ b/chimere/static/chimere/js/base.js
@@ -129,7 +129,9 @@ function share_link_update(){
$('.share_link').unbind('click').click(function(){
update_permalink();
var href = $(this).attr('href');
- var url = get_share_url;
+ var url = '';
+ if (area_name) url += "/" + area_name;
+ url += get_share_url;
var classes = $(this).attr('class').split(' ');
prefix = 'share_id_';
var share_id;
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js
index f69565a..dbbc97d 100644
--- a/chimere/static/chimere/js/jquery.chimere.js
+++ b/chimere/static/chimere/js/jquery.chimere.js
@@ -314,6 +314,7 @@ function transformCoordToLonLat(coord) {
}
settings[map_id] = $.extend({}, defaults);
settings[map_id]._revision = 0;
+ settings[map_id].load_start = Date.now();
if ( options ) $.extend(settings[map_id], options);
@@ -747,7 +748,6 @@ function transformCoordToLonLat(coord) {
}
});
$("#permalink").click(methods.update_permalink);
-
return;
/*
@@ -1691,7 +1691,12 @@ function transformCoordToLonLat(coord) {
}
if (!data.features){
data.features = [];
- if (ids != '0') methods.displayMessage(labels['no_marker_message']);
+ var laps = Math.floor(
+ (Date.now() - settings[map_id].load_start)/1000
+ ); // arbitrary time for too fast load
+ if (ids != '0' && laps > 4){
+ methods.displayMessage(labels['no_marker_message']);
+ }
}
if (data.zoom_need_reload){
settings[map_id]._zoom_need_reload = data.zoom_need_reload;