diff options
Diffstat (limited to 'js/index.js')
-rw-r--r-- | js/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/index.js b/js/index.js index 349794a..ac418da 100644 --- a/js/index.js +++ b/js/index.js @@ -150,6 +150,21 @@ function init_tooltips() { } } }); +} + +function show_summary(elem) { + var id = elem.getAttribute("data-book-id"); + + $.post("backend.php", {op: 'getinfo', id: id}, function(data) { + + var comment = data.comment ? data.comment : 'No description available'; + + $("#summary-modal .modal-title").html(data.title); + $("#summary-modal .book-summary").html(comment); + + $("#summary-modal").modal(); + + }); } |