demarches-normaliennes/app/assets/javascripts/old_design/dossier_commentaires_modal.js

15 lines
448 B
JavaScript

$(document).on('turbolinks:load', init_modal_commentaire);
function init_modal_commentaire() {
var modal = $("#modalCommentairesDossierParChamp");
var body = modal.find(".modal-body");
var originalBody = body.html();
modal.on("show.bs.modal", function (e) {
body.load(e.relatedTarget.getAttribute("data-href"));
});
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
body.html(originalBody);
});
}