From 7c986f2de7882dd0b758f728abcd38ec304f5e43 Mon Sep 17 00:00:00 2001 From: Thomas Hille Date: Tue, 21 Mar 2017 17:35:46 +0100 Subject: [PATCH] fixed problem that no new files could be added to an exercise --- app/assets/javascripts/exercises.js.erb | 3 ++- app/views/exercises/_form.html.slim | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/exercises.js.erb b/app/assets/javascripts/exercises.js.erb index 2a17b405..5d202d64 100644 --- a/app/assets/javascripts/exercises.js.erb +++ b/app/assets/javascripts/exercises.js.erb @@ -228,7 +228,8 @@ $(function() { } if ($.isController('exercises')) { - if ($('table').isPresent()) { + // ignore tags table since it is in the dom before other tables + if ($('table:not(#tags-table)').isPresent()) { enableBatchUpdate(); } else if ($('.edit_exercise, .new_exercise').isPresent()) { execution_environments = $('form').data('execution-environments'); diff --git a/app/views/exercises/_form.html.slim b/app/views/exercises/_form.html.slim index 0811b447..5ab8502b 100644 --- a/app/views/exercises/_form.html.slim +++ b/app/views/exercises/_form.html.slim @@ -40,7 +40,7 @@ = f.number_field "expected_worktime_minutes", value: @exercise.expected_worktime_seconds / 60, in: 1..1000, step: 1 h2 Tags .table-responsive - table.table + table.table#tags-table thead tr th = t('activerecord.attributes.exercise.selection')