40 lines
1.6 KiB
JavaScript
40 lines
1.6 KiB
JavaScript
|
|
$(document).ready(function () {
|
|
$('#afficheDocModal').on('show.bs.modal', function (event) { // id of the modal with event
|
|
var button = $(event.relatedTarget); // Button that triggered the modal
|
|
var doc_id = button.data('doc_id'); // Extract info from data-* attributes
|
|
var doc_titre = button.data('doc_name');
|
|
|
|
// Update the modal's content.
|
|
var modal = $(this);
|
|
modal.find('.modal-title').text(doc_titre);
|
|
modal.find('#imagesrc').attr('src',doc_id);
|
|
});
|
|
|
|
$('#ajoutPanierModal').on('show.bs.modal', function (event) { // id of the modal with event
|
|
var button = $(event.relatedTarget); // Button that triggered the modal
|
|
var rdv_noligne = button.data('rdv_noligne'); // Extract info from data-* attributes
|
|
var rdv_qte = button.data('rdv_qte');
|
|
|
|
// Update the modal's content.
|
|
var modal = $(this);
|
|
modal.find('.modal-qte').text(rdv_qte);
|
|
modal.find('.modal-lib').text(rdv_noligne);
|
|
// modal.find('#iframesrc').attr('src','/ajout/' + doc_id + '/' + justif_matricule);
|
|
});
|
|
|
|
// Affiche la FAQ dans un popup modal
|
|
$('#afficheFaqModal').on('show.bs.modal', function (event) {
|
|
var button = $(event.relatedTarget); // Button that triggered the modal
|
|
var faq_id = button.data('faqid'); // Extract info from data-* attributes
|
|
var faq_title = button.data('faqtitle');
|
|
|
|
// Update the modal's content.
|
|
var modal = $(this);
|
|
modal.find('.modal-title').text(faq_title);
|
|
modal.find('#iframesrc').attr('src','/faq_popup/' + faq_id);
|
|
});
|
|
|
|
});
|
|
|