mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
primer commit. añadido tema Velzon
This commit is contained in:
27
src/main/resources/static/assets/js/pages/modal.init.js
Normal file
27
src/main/resources/static/assets/js/pages/modal.init.js
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
Template Name: Velzon - Admin & Dashboard Template
|
||||
Author: Themesbrand
|
||||
Website: https://Themesbrand.com/
|
||||
Contact: Themesbrand@gmail.com
|
||||
File: Modal init js
|
||||
*/
|
||||
|
||||
|
||||
var varyingcontentModal = document.getElementById('varyingcontentModal')
|
||||
if (varyingcontentModal) {
|
||||
varyingcontentModal.addEventListener('show.bs.modal', function (event) {
|
||||
// Button that triggered the modal
|
||||
var button = event.relatedTarget
|
||||
// Extract info from data-bs-* attributes
|
||||
var recipient = button.getAttribute('data-bs-whatever')
|
||||
// If necessary, you could initiate an AJAX request here
|
||||
// and then do the updating in a callback.
|
||||
//
|
||||
// Update the modal's content.
|
||||
var modalTitle = varyingcontentModal.querySelector('.modal-title')
|
||||
var modalBodyInput = varyingcontentModal.querySelector('.modal-body input')
|
||||
|
||||
modalTitle.textContent = 'New message to ' + recipient
|
||||
modalBodyInput.value = recipient
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user