Show book details in modal dialog
With them shown in a modal, you don't lose your place in the pagination. If the request comes via Ajax, the minimal layout is used. If via a normal request, the full layout is used. That lets you open the details in a new tab and have the full experience, but if you're clicking through the results of a search, you can view many without losing your place.
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user