summaryrefslogtreecommitdiff
path: root/static/saclay/js/interface.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/saclay/js/interface.js')
-rw-r--r--static/saclay/js/interface.js51
1 files changed, 35 insertions, 16 deletions
diff --git a/static/saclay/js/interface.js b/static/saclay/js/interface.js
index 76a63da..e004ce4 100644
--- a/static/saclay/js/interface.js
+++ b/static/saclay/js/interface.js
@@ -1,9 +1,17 @@
-$(function(){
- $('#default-message').dialog({'autoOpen':false,
- 'resizable':false,
- width:630,
- 'dialogClass':'no-titlebar'});
+var init_default_message_diag = function(){
+ $('#default-message').dialog({
+ 'autoOpen':false,
+ 'resizable':false,
+ width:630,
+ 'dialogClass':'no-titlebar',
+ open: function () {$(".dialog-content .content").scrollTop(0); }
+ });
+}
+
+
+$(function(){
+ init_default_message_diag();
var update_editmarker = function(){
$("#main-map").chimere('cleanRoute');
$('.map_button').hide();
@@ -137,11 +145,6 @@ $(function(){
return false;
});
- $('.share-icon').click(function(){
- $(this).hide();
- $(this).nextAll('.shared').show();
- return false;
- });
$('.print-page').click(function(){
window.print();
return false;
@@ -156,9 +159,26 @@ $(function(){
par.removeClass('opened');
}
});
-
+ $('input[name="transport"]').change(change_routing_transport);
+ $('input[name="speed"]').change(change_routing_speed);
+ $('#id_speed').change(change_routing_speed);
});
+function change_routing_speed(){
+ var speed = $('#id_speed option:selected').val();
+ if(!speed){
+ speed = $('input[name=speed]:checked').val();
+ }
+ if (!speed) return;
+ speed = speed.split('_')[1]
+ $('#main-map').chimere('routingChangeSpeed', speed);
+}
+
+function change_routing_transport(){
+ $('#main-map').chimere('routingChangeTransport',
+ $('input[name="transport"]:checked').val());
+}
+
function display_feature_detail(data, settings){
settings.current_popup.setContentHTML("<div class='cloud'>" + data + "</div>");
$('.detail_zoomin').bind("click", function(event){
@@ -197,11 +217,6 @@ function display_feature_detail(data, settings){
$("#read_less_"+settings.current_feature.pk).hide();
$("#read_more_"+settings.current_feature.pk).show();
});
- $('.share-icon').click(function(){
- $(this).hide();
- $(this).parent().nextAll('.shared').show();
- return false;
- });
$(document).ready(function(){
share_link_update();
$("a[rel^='prettyPhoto']").prettyPhoto({
@@ -212,6 +227,10 @@ function display_feature_detail(data, settings){
$('html').addClass('js-on');
$(function(){
$('div.media-player').jmeEmbedControls();
+ setTimeout(function(){
+ settings.current_popup.updateSize();
+ setTimeout(function(){ settings.current_popup.updateSize(); }, 1000);
+ }, 1000);
});
}