demarches-normaliennes/app/assets/javascripts/gestionnaire_dossier_modal.js

16 lines
643 B
JavaScript
Raw Normal View History

$(document).on('page:load', modal_action);
$(document).ready(modal_action);
function modal_action() {
$('#PJmodal').on('show.bs.modal', function (event) {
2016-03-17 14:50:10 +01:00
$("#PJmodal .modal-body .table .tr_content").hide();
var button = $(event.relatedTarget) // Button that triggered the modal
2016-03-17 14:50:10 +01:00
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)
2016-03-17 14:50:10 +01:00
modal.find('#PJmodal_title').html(modal_title);
$("#PJmodal .modal-body .table #"+modal_index).show();
})
}