Fix adding files to exercises (as admin)

Prevent hidden selection field from being removed after cloning the dummy. Also ensure the caret looks nice and add the file extension if possible
This commit is contained in:
Sebastian Serth
2018-11-29 22:32:12 +01:00
parent 5d13ee0e56
commit b94289f36f
2 changed files with 9 additions and 5 deletions

View File

@ -66,7 +66,6 @@ $(document).on('turbolinks:load', function() {
$('#files').append(html);
$('#files li:last select[name*="file_type_id"]').val(getSelectedExecutionEnvironment().file_type_id);
$('#files li:last select').chosen(window.CodeOcean.CHOSEN_OPTIONS);
$('#files li:last select').remove();
$('#files li:last>div:last').removeClass('in').addClass('show')
$('body, html').scrollTo('#add-file');