Skip to content

Commit

Permalink
minor changes to delete button
Browse files Browse the repository at this point in the history
  • Loading branch information
xzheng902 committed Jul 25, 2019
1 parent 6c72dbc commit 3812091
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bcforms/web/app.js
Expand Up @@ -59,6 +59,14 @@ $(document).on('click', '.remove_subunit', function(){
var button_id = $(this).attr("id")
$('#panel'+button_id+'').remove()
$('#tab'+button_id+'').remove()

// open first tab
for (var i=0; i<num_subunits; i++) {
if ($('#panel'+i).length) {
$('#tabs_subunits_dynamic').foundation('_openTab', $('#tab'+i));
break
}
}
})

$(document).on('change', '.subunit_info_select', function(){
Expand Down Expand Up @@ -175,7 +183,7 @@ $('#submit').click(function (evt) {
'subunits': subunits
}

console.log(JSON.stringify(data))
// console.log(JSON.stringify(data))

$.ajax({
type: 'post',
Expand Down

0 comments on commit 3812091

Please sign in to comment.