diff --git a/cps/static/js/main.js b/cps/static/js/main.js index d759a3b8..55ea42b3 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -121,6 +121,17 @@ $(function() { }); }); + $('#bookDetailsModal') + .on('show.bs.modal', function(e) { + var $modalBody = $(this).find('.modal-body'); + $.get(e.relatedTarget.href).done(function(content) { + $modalBody.html(content); + }); + }) + .on('hidden.bs.modal', function() { + $(this).find('.modal-body').html('...'); + }); + $(window).resize(function(event) { $(".discover .row").isotope("reLayout"); }); diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 14389809..1d6efe0e 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -1,4 +1,4 @@ -{% extends "layout.html" %} +{% extends is_xhr|yesno("fragment.html", "layout.html") %} {% block body %}