Fix JS
This commit is contained in:
parent
8195a57f9c
commit
893bfaef40
1 changed files with 14 additions and 11 deletions
|
@ -1,13 +1,16 @@
|
||||||
$(document).ready(function () {
|
$(document).on('page:load', init_modal_commentaire);
|
||||||
var modal = $("#modalCommentairesDossierParChamp");
|
$(document).ready(init_modal_commentaire);
|
||||||
var body = modal.find(".modal-body");
|
|
||||||
var originalBody = body.html();
|
|
||||||
|
|
||||||
modal.on("show.bs.modal", function (e) {
|
function init_modal_commentaire() {
|
||||||
body.load(e.relatedTarget.getAttribute("data-href"));
|
var modal = $("#modalCommentairesDossierParChamp");
|
||||||
});
|
var body = modal.find(".modal-body");
|
||||||
|
var originalBody = body.html();
|
||||||
|
|
||||||
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
|
modal.on("show.bs.modal", function (e) {
|
||||||
body.html(originalBody);
|
body.load(e.relatedTarget.getAttribute("data-href"));
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
|
||||||
|
body.html(originalBody);
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in a new issue