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) { function onReady(geo) {
_ctx = { _ctx = {
geo: geo, geo: geo,
@ -48,8 +40,15 @@
}; };
$('#minScore,#hintSteps,#walkingDist,#maxResults').change(onSearch); $('#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(); onSearch();
} }
@ -58,6 +57,7 @@
_ctx.query = { _ctx.query = {
features: _ctx.query.features || {}, features: _ctx.query.features || {},
range: { min: -1.0, max: 1.0 }, range: { min: -1.0, max: 1.0 },
profile: localStorage,
walkingDist: parseFloat($('#walkingDist').val()), walkingDist: parseFloat($('#walkingDist').val()),
minScore: parseFloat($('#minScore').val()), minScore: parseFloat($('#minScore').val()),
hintSteps: parseInt($('#hintSteps').val()), hintSteps: parseInt($('#hintSteps').val()),