Adds hashlink to url after running prediction, gets hashlink from url on page load. Doesn't populate form yet

pull/73/head
jonsowman 2010-06-05 17:28:49 +01:00
rodzic 9e9169e295
commit 7c80b0aa05
2 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -42,6 +42,10 @@ var clickListener;
var clickMarker;
function initialize() {
if(window.location.hash != "") {
var ln = window.location.hash.split("=");
current_uuid = ln[1];
}
// make the map and set center
var latlng = new google.maps.LatLng(52, 0);
var myOptions = {

Wyświetl plik

@ -33,6 +33,11 @@ function populateFormByUUID(pred_uuid) {
}, 'json');
}
function addHashLink(link) {
var ln = "#!/" + link;
window.location = ln;
}
function showMousePos(GLatLng) {
var curr_lat = GLatLng.lat().toFixed(4);
var curr_lon = GLatLng.lng().toFixed(4);
@ -122,6 +127,7 @@ function processProgress(progress) {
clearInterval(ajaxEventHandle);
// parse the data
getCSV(current_uuid);
addHashLink("uuid="+current_uuid);
} else if ( progress['pred_running'] != true ) {
$("#prediction_status").html("Waiting for predictor to run...");
appendDebug("Server says: predictor not yet running...");