diff options
author | Andrew Dolgov <[email protected]> | 2017-03-05 23:05:42 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-03-05 23:05:42 +0300 |
commit | 3cfa1d1cae9cc5dc1b4ca3210ae39a16e3c45ccf (patch) | |
tree | 67eedd3ee523d1561524d801c1865cca9c0c4ca9 /js/index.js | |
parent | 237a9e913ddf1c281a62dc3fb144aa543c483fb0 (diff) |
add dropdown menu item to show book summary
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(); + + }); } |