Fixing small errors

This commit is contained in:
Claude Paroz 2012-12-13 00:00:04 +01:00
parent d3afd56946
commit d4435c02ab
4 changed files with 17 additions and 4 deletions

View file

@ -193,8 +193,10 @@ $(document).ready(function() {
// Update referent select
var parsed = $('#referent_select option:selected').text().match(/(.*)\((\d+)\)/);
$('#referent_select option:selected').text(parsed[1] +' (' + (parseInt(parsed[2]) + 1) + ')');
$('#referent_select').val('');
if (parsed) {
$('#referent_select option:selected').text(parsed[1] +' (' + (parseInt(parsed[2]) + 1) + ')');
$('#referent_select').val('');
}
update_trainings($('#period_select').val());
}