diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/blob/blob_file_dropzone.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/blob/blob_file_dropzone.js')
-rw-r--r-- | app/assets/javascripts/blob/blob_file_dropzone.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/assets/javascripts/blob/blob_file_dropzone.js b/app/assets/javascripts/blob/blob_file_dropzone.js index e8772b7240a..19bad64155d 100644 --- a/app/assets/javascripts/blob/blob_file_dropzone.js +++ b/app/assets/javascripts/blob/blob_file_dropzone.js @@ -43,16 +43,14 @@ export default class BlobFileDropzone { previewsContainer: '.dropzone-previews', headers: csrf.headers, init() { - this.on('processing', function() { + this.on('processing', function () { this.options.url = form.attr('action'); }); this.on('addedfile', () => { toggleLoading(submitButton, submitButtonLoadingIcon, false); dropzoneMessage.addClass(HIDDEN_CLASS); - $('.dropzone-alerts') - .html('') - .hide(); + $('.dropzone-alerts').html('').hide(); }); this.on('removedfile', () => { toggleLoading(submitButton, submitButtonLoadingIcon, false); @@ -62,7 +60,7 @@ export default class BlobFileDropzone { $('#modal-upload-blob').modal('hide'); visitUrl(response.filePath); }); - this.on('maxfilesexceeded', function(file) { + this.on('maxfilesexceeded', function (file) { dropzoneMessage.addClass(HIDDEN_CLASS); this.removeFile(file); }); @@ -74,9 +72,7 @@ export default class BlobFileDropzone { }, // Override behavior of adding error underneath preview error(file, errorMessage) { - const stripped = $('<div/>') - .html(errorMessage) - .text(); + const stripped = $('<div/>').html(errorMessage).text(); $('.dropzone-alerts') .html(sprintf(__('Error uploading file: %{stripped}'), { stripped })) .show(); @@ -84,7 +80,7 @@ export default class BlobFileDropzone { }, }); - submitButton.on('click', e => { + submitButton.on('click', (e) => { e.preventDefault(); e.stopPropagation(); if (dropzone[0].dropzone.getQueuedFiles().length === 0) { |