Add fullscreen mode for modal
This commit is contained in:
parent
8260c6c5da
commit
0e44a01218
@ -195,7 +195,7 @@ export async function registerAllListeners() {
|
|||||||
`,
|
`,
|
||||||
confirmText: 'Ajouter un service',
|
confirmText: 'Ajouter un service',
|
||||||
cancelText: 'Annuler'
|
cancelText: 'Annuler'
|
||||||
});
|
}, true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
@ -171,13 +171,13 @@ export default class ModalService {
|
|||||||
if (this.modal) this.modal.style.display = 'none';
|
if (this.modal) this.modal.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
async showConfirmationModal(options: ConfirmationModalOptions): Promise<boolean> {
|
async showConfirmationModal(options: ConfirmationModalOptions, fullscreen: boolean = false): Promise<boolean> {
|
||||||
// Create modal element
|
// Create modal element
|
||||||
const modalElement = document.createElement('div');
|
const modalElement = document.createElement('div');
|
||||||
modalElement.id = 'confirmation-modal';
|
modalElement.id = 'confirmation-modal';
|
||||||
modalElement.innerHTML = `
|
modalElement.innerHTML = `
|
||||||
<div class="modal-overlay">
|
<div class="modal-overlay">
|
||||||
<div class="modal-content">
|
<div class="modal-content" ${fullscreen ? 'style="width: width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; border-radius: 0 !important;"' : ''}>
|
||||||
<h2>${options.title}</h2>
|
<h2>${options.title}</h2>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
${options.content}
|
${options.content}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user