X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fpres_view%2Frecup_data.js;fp=plugins%2Fpres_view%2Frecup_data.js;h=ba930e2581d606dad336173463147950ba61ebdd;hb=43ca2628d94ef6f810129e422701f2415d95ceb3;hp=0000000000000000000000000000000000000000;hpb=9c3ecdab818e1792e6d781df95098b30543ff69f;p=unfold.git diff --git a/plugins/pres_view/recup_data.js b/plugins/pres_view/recup_data.js new file mode 100644 index 00000000..ba930e25 --- /dev/null +++ b/plugins/pres_view/recup_data.js @@ -0,0 +1,158 @@ +function recup_data (url,id,method) +{ + var longueur; + j.getJSON(url, function(data) + { + j.each(data , function(key, val) + { + switch ( val.params.data.print_method ) + { + case 'marker' : + pos_marker[id]= []; + opt_marker[id]= []; + marker[id]= []; + ref[id] = 'marker'; + break; + case 'line' : + opt_line[id] =[]; + pos_line[id]= []; + line[id]= []; + ref[id] = 'line'; + break; + case 'circle' : + opt_circle[id] =[]; + pos_circle[id]= []; + circle[id]= []; + ref[id] = 'circle'; + break; + default: + alert ("unknown method"); + break; + } + for ( var i= 0; i