1

Update profile on dialog close

This commit is contained in:
Alex Yatskov 2015-03-11 11:56:52 +09:00
parent 6179478b36
commit 86deb64108

View File

@ -33,14 +33,6 @@
});
}
function accessReview(id) {
$.getJSON('/access', {id: id}, function(results) {
if (results.success) {
location.replace(results.url);
}
});
}
function onReady(geo) {
_ctx = {
geo: geo,
@ -48,8 +40,15 @@
};
$('#minScore,#hintSteps,#walkingDist,#maxResults').change(onSearch);
$('#profileDlg').on('hidden.bs.modal', onSearch);
window.accessReview = accessReview;
window.accessReview = function(id) {
$.getJSON('/access', {id: id}, function(results) {
if (results.success) {
location.replace(results.url);
}
});
};
onSearch();
}
@ -58,6 +57,7 @@
_ctx.query = {
features: _ctx.query.features || {},
range: { min: -1.0, max: 1.0 },
profile: localStorage,
walkingDist: parseFloat($('#walkingDist').val()),
minScore: parseFloat($('#minScore').val()),
hintSteps: parseInt($('#hintSteps').val()),