From f20a8b580ab16113620c1937f640a8e26608f233 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Thu, 22 Feb 2024 17:24:22 +0100 Subject: [PATCH] Remove Alchemy.FileProgress file This is not in use anymore since we refactored the file uploader --- .../alchemy/alchemy.file_progress.js.coffee | 66 ------------------- 1 file changed, 66 deletions(-) delete mode 100644 app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee diff --git a/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee b/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee deleted file mode 100644 index 8f34ca9f50..0000000000 --- a/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +++ /dev/null @@ -1,66 +0,0 @@ -window.Alchemy = {} if typeof(window.Alchemy) is 'undefined' - -Alchemy.FileProgress = (file) -> - - # Build Wrapper - @$fileProgressWrapper = $('
') - - # Build Container - @$fileProgressElement = $('
') - - # Append Cancel Button - @$fileProgressCancel = $('') - @$fileProgressElement.append @$fileProgressCancel - - # Append Filename - @$fileProgressElement.append "
" + file.name + "
" - - # Append Progressbar Status Text - @$fileProgressStatus = $('
 
') - @$fileProgressElement.append @$fileProgressStatus - - # Build Progressbar Container - $progressBarContainer = $('
') - - # Build Progressbar - @$progressBar = $('
') - - # Knit all together - $progressBarContainer.append @$progressBar - @$fileProgressElement.append $progressBarContainer - @$fileProgressWrapper.append @$fileProgressElement - $('.upload-progress-container').append @$fileProgressWrapper - this - -Alchemy.FileProgress::reset = -> - @$fileProgressStatus.html ' ' - @$progressBar.removeClass().addClass 'progress-bar-in-progress' - @$progressBar.css width: '0%' - -Alchemy.FileProgress::setProgress = (percentage) -> - @$progressBar.removeClass().addClass 'progress-bar-in-progress' - @$progressBar.css width: percentage + '%' - -Alchemy.FileProgress::setComplete = -> - @$progressBar.removeClass().addClass 'progress-bar-complete' - @$progressBar.css width: '100%' - @$fileProgressCancel.hide() - @$fileProgressWrapper.delay(1500).fadeOut -> - $(this).remove() - -Alchemy.FileProgress::setError = -> - @$progressBar.removeClass().addClass 'progress-bar-error' - @$progressBar.css width: '100%' - -Alchemy.FileProgress::setCancelled = -> - @$progressBar.removeClass().addClass 'progress-bar-canceled' - @$progressBar.css width: '100%' - @$fileProgressCancel.hide() - @$fileProgressWrapper.delay(1500).fadeOut -> - $(this).remove() - if $('.upload-progress-container').is(':empty') - $('.overall-upload').removeClass('visible') - return - -Alchemy.FileProgress::setStatus = (status) -> - @$fileProgressStatus.text Alchemy.t(status)