2016-03-16 15:34:35 +01:00
|
|
|
$(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();
|
|
|
|
|
2016-03-16 15:34:35 +01:00
|
|
|
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
|
2016-03-16 15:34:35 +01:00
|
|
|
|
|
|
|
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();
|
2016-03-16 15:34:35 +01:00
|
|
|
})
|
|
|
|
}
|