Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions administrator/components/com_media/tmpl/file/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
<?php echo $this->getDocument()->getToolbar('toolbar')->render(); ?>
</div>
<?php endif; ?>
<div id="progress" class="progress visually-hidden">
<div id="progress-bar" class="progress-bar bg-success" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<form action="#" method="post" name="adminForm" id="media-form" class="form-validate main-card media-form mt-3">
<?php $fieldSets = $form->getFieldsets(); ?>
<?php if ($fieldSets) : ?>
Expand Down
27 changes: 18 additions & 9 deletions build/media_source/com_media/js/edit-images.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,26 @@ class Edit {
// eslint-disable-next-line class-methods-use-this
Redo() { }

// @TODO Create the progress bar
// eslint-disable-next-line class-methods-use-this
createProgressBar() { }
createProgressBar() {
this.progress = document.getElementById('progress');
this.progressBar = document.querySelector('.progress-bar');
this.progress.classList.remove('visually-hidden');
}

// @TODO Update the progress bar
// eslint-disable-next-line class-methods-use-this
updateProgressBar(/* position */) { }
updateProgressBar(position) {
if (this.progressBar) {
this.progressBar.style.width = `${position}%`;
this.progressBar.setAttribute('aria-valuenow', position);
}
}

// @TODO Remove the progress bar
// eslint-disable-next-line class-methods-use-this
removeProgressBar() { }
removeProgressBar() {
if (this.progress && this.progressBar) {
this.progress.classList.add('visually-hidden');
this.progressBar.style.width = '0';
this.progressBar.setAttribute('aria-valuenow', '0');
}
}

/**
* Uploads
Expand Down