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

16 lines
585 B
JavaScript
Raw Normal View History

2017-03-30 17:00:35 +02:00
$(document).on('turbolinks:load', modal_action);
function modal_action() {
2017-04-04 16:15:33 +02:00
$('#PJmodal').on('show.bs.modal', function (event) {
$("#PJmodal .modal-body .table .tr_content").hide();
2016-03-17 14:50:10 +01:00
2017-04-04 16:15:33 +02:00
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
2017-04-04 16:15:33 +02:00
var modal = $(this)
modal.find('#PJmodal_title').html(modal_title);
$("#PJmodal .modal-body .table #"+modal_index).show();
})
}