Moved modal closing to hide.bs.modal - Fixes #71

pull/75/head
Jordan Wright 2016-01-16 19:24:13 -06:00
parent 86e0255ae6
commit 65005a2805
2 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,7 @@ function save(idx){
successFlash("Group updated successfully!")
load()
dismiss()
$("#modal").modal('hide')
})
.error(function(data){
modalError(data.responseJSON.message)
@ -37,6 +38,7 @@ function save(idx){
successFlash("Group added successfully!")
load()
dismiss()
$("#modal").modal('hide')
})
.error(function(data){
modalError(data.responseJSON.message)
@ -48,7 +50,6 @@ function dismiss(){
$("#targetsTable").dataTable().DataTable().clear().draw()
$("#name").val("")
$("#modal\\.flashes").empty()
$("#modal").modal('hide')
}
function edit(idx){
@ -176,4 +177,7 @@ $(document).ready(function(){
.remove()
.draw();
})
$("#modal").on("hide.bs.modal", function(){
dismiss()
})
})

View File

@ -107,7 +107,7 @@
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" onclick="dismiss()">Close</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="modalSubmit">Save changes</button>
</div>
</div>