window.onbeforeunload=function() {
if (!changesaved) {
- return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
+ return '<%= escape_javascript(t('site.edit.potlatch2_unsaved_changes')) %>';
}
}
fo.addVariable("oauth_consumer_secret","<%= token.client_application.secret %>");
fo.addVariable("maximise_function","maximiseMap");
fo.addVariable("minimise_function","minimiseMap");
+ fo.addVariable("move_function","mapMoved");
fo.write("map");
}
doSWF(<%= @lat || 'null' %>,<%= @lon || 'null' %>,<%= @zoom %>);
function setPosition(lat, lon, zoom) {
- doSWF(lat, lon, zoom || 15);
+ $("potlatch").setPosition(lat, lon, Math.max(zoom || 15, 13));
+ }
+
+ function mapMoved(lon, lat, zoom, minlon, minlat, maxlon, maxlat) {
+ updatelinks(lon, lat, zoom, null, minlon, minlat, maxlon, maxlat);
}
</script>