mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
[Organization] A click on a neutral element of the page deselects the pages
This commit is contained in:
parent
66cc24abd1
commit
1eb0f5101b
@ -690,6 +690,13 @@ var createEventsListener = function() {
|
|||||||
document.querySelector('#modalDrag').addEventListener('hidden.bs.modal', event => {
|
document.querySelector('#modalDrag').addEventListener('hidden.bs.modal', event => {
|
||||||
document.querySelector('#list_pdf_container').insertAdjacentElement('afterbegin', document.querySelector('#list_pdf'));
|
document.querySelector('#list_pdf_container').insertAdjacentElement('afterbegin', document.querySelector('#list_pdf'));
|
||||||
});
|
});
|
||||||
|
document.querySelector('body').addEventListener('click', function(event) {
|
||||||
|
if(!event.originalTarget.classList.contains('offcanvas-header') && !event.originalTarget.classList.contains('offcanvas-body') && event.originalTarget.id != 'container-pages' && event.originalTarget.id != 'sidebarToolsLabel' && event.originalTarget.id != 'btn_container') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
document.getElementById('btn_cancel_select').click();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPDFBlobFromCache(cacheUrl) {
|
async function getPDFBlobFromCache(cacheUrl) {
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
<button id="btn_rotate_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrow-clockwise"></i> Tourner de 90°</button>
|
<button id="btn_rotate_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrow-clockwise"></i> Tourner de 90°</button>
|
||||||
<button id="btn_drag_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrows-move"></i> Déplacer</button>
|
<button id="btn_drag_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-arrows-move"></i> Déplacer</button>
|
||||||
<button id="btn_delete_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-trash"></i> Supprimer</button>
|
<button id="btn_delete_select" disabled="disabled" type="button" class="btn btn-sm btn-outline-secondary"><i class="bi bi-trash"></i> Supprimer</button>
|
||||||
<button id="save-select" class="btn btn-sm btn-outline-secondary" disabled="disabled" form="form_pdf" type="submit"><i class="bi bi-download"></i> Télécharger</button>
|
<button id="save-select" class="btn btn-sm btn-outline-secondary" disabled="disabled" form="form_pdf" type="submit"><i class="bi bi-download"></i> Extraire et télécharger</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer d-none small text-center p-1 border-primary bg-primary bg-opacity-25"><a id="btn_cancel_select_footer" type="button" aria-label="Close" style="text-decoration: none;" class="text-primary"><i class="bi bi-x-lg"></i> Annuler la sélection</a></div>
|
<div class="card-footer d-none small text-center p-1 border-primary bg-primary bg-opacity-25"><a id="btn_cancel_select_footer" type="button" aria-label="Close" style="text-decoration: none;" class="text-primary"><i class="bi bi-x-lg"></i> Annuler la sélection</a></div>
|
||||||
</div>
|
</div>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
<form id="form_pdf" action="/organize" method="post" enctype="multipart/form-data">
|
<form id="form_pdf" action="/organize" method="post" enctype="multipart/form-data">
|
||||||
<input id="input_pdf" name="pdf[]" type="file" class="d-none" />
|
<input id="input_pdf" name="pdf[]" type="file" class="d-none" />
|
||||||
<input id="input_pages" type="hidden" value="" name="pages" />
|
<input id="input_pages" type="hidden" value="" name="pages" />
|
||||||
<div class="d-grid gap-2 mt-2">
|
<div id="btn_container" class="d-grid gap-2 mt-2">
|
||||||
<button class="btn btn-primary" type="submit" id="save"><i class="bi bi-download"></i> Télécharger le PDF complet</button>
|
<button class="btn btn-primary" type="submit" id="save"><i class="bi bi-download"></i> Télécharger le PDF complet</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user