Use chickpea listen_form method in map_update_tilelayers

This commit is contained in:
Yohan Boniface 2012-11-26 11:43:56 +01:00
parent a92eafe9ac
commit ee34c4e2dd

View file

@ -19,23 +19,5 @@
</form> </form>
<script type="text/javascript"> <script type="text/javascript">
$("#map_edit").on("submit", function (e) { L.Util.Xhr.listen_form('map_edit');
e.preventDefault();
L.Util.Xhr.submit_form("map_edit", {
'callback': function (data) {
if (data.redirect) {
window.location = data.redirect;
}
else if (data.info) {
$div = $('<div>').addClass('alert-box success').html(data.info);
$div.append('<a href="#" class="close">&times;</a>');
$("#map").prepend($div);
}
else {
$("#map_edit").parent().empty().append(data.html);
}
},
'dataType': 'json'
});
});
</script> </script>