Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 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
11 changes: 7 additions & 4 deletions administrator/components/com_media/tmpl/file/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@
$this->useCoreUI = true;
?>
<?php if ($tmpl === 'component') : ?>
<div class="subhead noshadow mb-3">
<?php echo $this->getDocument()->getToolbar('toolbar')->render(); ?>
</div>
<div class="subhead noshadow mb-3">
<?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 All @@ -72,4 +75,4 @@
<?php endif; ?>
<input type="hidden" name="mediatypes" value="<?php echo $this->escape($mediaTypes); ?>">
</form>
<script type="module" src="<?php echo $script . '?' . $this->getDocument()->getMediaVersion(); ?>"></script>
<script type="module" src="<?php echo $script . '?' . $this->getDocument()->getMediaVersion(); ?>"></script>
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