Downoad button in mobile mode

This commit is contained in:
Vincent LAURENT 2022-05-21 10:01:17 +02:00
parent f0e86c61da
commit 62c5bbab91
2 changed files with 10 additions and 1 deletions

View File

@ -402,6 +402,9 @@ var createEventsListener = function() {
});
document.querySelector('#input_pages').value = order.join(',');
});
document.getElementById('save_mobile').addEventListener('click', function(event) {
document.getElementById('save').click();
});
document.getElementById('input_pdf_upload_2').addEventListener('change', async function(event) {
if(this.files[0].size > maxSize) {

View File

@ -86,6 +86,12 @@
</div>
</div>
</div>
<div class="position-fixed bottom-0 start-0 bg-white w-100 p-2 shadow d-md-none">
<div class="d-grid gap-2">
<button class="btn btn-primary" type="submit" id="save_mobile"><i class="bi bi-download"></i> Télécharger le PDF</button>
</div>
</div>
<span id="is_mobile" class="d-md-none"></span>
<script src="/vendor/bootstrap.min.js?5.1.3"></script>
@ -93,6 +99,6 @@
<script>
var maxSize = <?php echo $maxSize ?>;
</script>
<script src="/js/organization.js?202205210106"></script>
<script src="/js/organization.js?202205211001"></script>
</body>
</html>