diff --git a/app/assets/javascripts/repositories/renderers/columns/asset.js b/app/assets/javascripts/repositories/renderers/columns/asset.js index ead76188b..0d75973b9 100644 --- a/app/assets/javascripts/repositories/renderers/columns/asset.js +++ b/app/assets/javascripts/repositories/renderers/columns/asset.js @@ -32,12 +32,13 @@ var AssetColumnHelper = (function() { } else { $el .prev('.file-hidden-field-container') - .html(``); filesUploadedCntr += 1; + if (filesUploadedCntr === filesToUploadCntr) { resolve('done'); } @@ -52,12 +53,13 @@ var AssetColumnHelper = (function() { let empty = $cell.is(':empty'); let fileName = $cell.find('a.file-preview-link').text(); let placeholder = I18n.t('repositories.table.assets.select_file_btn', { max_size: GLOBAL_CONSTANTS.FILE_MAX_SIZE_MB }); + let rowId = $cell.parent().attr('id'); $cell.html(`
- +
`); diff --git a/app/assets/javascripts/repositories/row_editor.js b/app/assets/javascripts/repositories/row_editor.js index eb225099d..93c916292 100644 --- a/app/assets/javascripts/repositories/row_editor.js +++ b/app/assets/javascripts/repositories/row_editor.js @@ -26,7 +26,7 @@ var RepositoryDatatableRowEditor = (function() { let $row = $form.closest('tr'); let valid = true; let directUrl = $table.data('direct-upload-url'); - let $files = $row.find('input[type=file]'); + let $files = $table.find('input[type=file]'); $row.find('.has-error').removeClass('has-error').find('span').remove(); // Validations here