Use chickpea listen_form method in map_update_tilelayers
This commit is contained in:
parent
a92eafe9ac
commit
ee34c4e2dd
1 changed files with 1 additions and 19 deletions
|
@ -19,23 +19,5 @@
|
|||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#map_edit").on("submit", function (e) {
|
||||
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">×</a>');
|
||||
$("#map").prepend($div);
|
||||
}
|
||||
else {
|
||||
$("#map_edit").parent().empty().append(data.html);
|
||||
}
|
||||
},
|
||||
'dataType': 'json'
|
||||
});
|
||||
});
|
||||
L.Util.Xhr.listen_form('map_edit');
|
||||
</script>
|
Loading…
Reference in a new issue