Fix javascript errors

This commit is contained in:
Claude Paroz 2016-01-13 20:25:37 +01:00
parent 7a04bdff8d
commit 5f501caeb2
2 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,5 @@
function update_periods(section_id) {
if (!section_id) return;
$.getJSON('/section/' + section_id + '/periods/', function(data) {
var sel = $('#period_select');
sel.append($("<option />").val('').text('-------'));
@ -78,7 +79,7 @@ function update_trainings(period_id) {
if ($('ul#training_list').children().length > 0)
$('input#export').show();
else $('input#export').hide();
if ($('#corp_select').attr('options').length > 0)
if ($('#corp_select option').length > 0)
$('input#export_non_attr').show();
else $('input#export_non_attr').hide();
}

View file

@ -8,10 +8,10 @@
select#period_select { width: 16em; }
div#student_choice { float: left; width: 18%; }
select#student_select, select#student_filter { width: 100%; }
select#student_select, select#student_filter { width: 100%; height: auto; }
div#corp_choice { float: right; width: 18%; }
select#corp_select, select#corp_filter { width: 100%; }
select#corp_select, select#corp_filter { width: 100%; height: auto; }
div#student_detail { float:left; width: 40%; margin: 1em; padding: 0.5em; border: 3px solid red; min-height: 4em; border-radius: 8px; }
div#previous_stages { background-color: #EEE; border-radius: 4px; }