mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-03-26 07:31:11 +00:00
bootstrap: fix minor issues with profile picture cropping
* Add required [1] "display: block;" style property to img element * Fix image overflow in modal. As cropper size inherits from img's parent element [2] (including padding according to my research), we need to wrap modal body into another div that has the padding we want. * Remove ability [3] to click away to dismiss the modal as it often interfered with user interaction when cropping. [1] https://github.com/fengyuanchen/cropperjs/tree/v1?tab=readme-ov-file#example [2] https://github.com/fengyuanchen/cropperjs/tree/v1?tab=readme-ov-file#notes [3] https://getbootstrap.com/docs/4.0/components/modal/#options Signed-off-by: Alexis Mercier des Rochettes <apernouille@gmail.com>
This commit is contained in:
parent
56a43396d4
commit
93aed87265
@ -20,12 +20,14 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||||
</form>
|
||||
</div>
|
||||
<!-- MODAL TO CROP THE IMAGE -->
|
||||
<div class="modal fade" id="modalCrop">
|
||||
<div class="modal fade" id="modalCrop" data-backdrop="static">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<img src="" id="modal-image" style="max-width: 100%;">
|
||||
</div>
|
||||
<div class="modal-body-wrapper" style="width: 500px; height: 500px; padding: 16px;">
|
||||
<div class="modal-body" style="width: 100%; height: 100%; padding: 0">
|
||||
<img src="" id="modal-image" style="display: block; max-width: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="btn-group pull-left" role="group">
|
||||
<button type="button" class="btn btn-default" id="js-zoom-in">
|
||||
|
Loading…
x
Reference in New Issue
Block a user