Fix saving exercise collections

This commit is contained in:
Maximilian Grundke
2018-08-20 16:38:10 +02:00
parent 45b6b16c5b
commit 16933632ae

View File

@@ -187,6 +187,7 @@ $(function() {
for (var i = 0; i < selectedExercises.length; i++) {
addExercise(selectedExercises[i].value, selectedExercises[i].label);
}
updateExerciseList();
});
removeExerciseButtons.on('click', function (e) {
@@ -195,7 +196,8 @@ $(function() {
var row = $(this).parent().parent();
var exerciseId = row.data('id');
$('#exercise-list').find('option[value="' + exerciseId + '"]').prop('selected', false);
row.remove()
row.remove();
updateExerciseList();
});
sortButton.on('click', function (e) {