demarches-normaliennes/app/assets/javascripts/old_design/instructeur_dossier_modal.js
Pierre de La Morinerie b5f1d97629 app: disable Turbolinks
Fix #5039
2020-05-13 11:04:16 +02:00

17 lines
612 B
JavaScript

/* globals $ */
$(document).on('DOMContentLoaded', modal_action);
function modal_action() {
$('#pj-modal').on('show.bs.modal', function (event) {
$('#pj-modal .modal-body .table .tr-content').hide();
var button = $(event.relatedTarget); // Button that triggered the modal
var modal_title = button.data('modal_title'); // Extract info from data-* attributes
var modal_index = button.data('modal_index'); // Extract info from data-* attributes
var modal = $(this);
modal.find('#pj-modal-title').html(modal_title);
$('#pj-modal .modal-body .table #' + modal_index).show();
});
}