summaryrefslogtreecommitdiff
path: root/js/index.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-03-05 23:05:42 +0300
committerAndrew Dolgov <[email protected]>2017-03-05 23:05:42 +0300
commit3cfa1d1cae9cc5dc1b4ca3210ae39a16e3c45ccf (patch)
tree67eedd3ee523d1561524d801c1865cca9c0c4ca9 /js/index.js
parent237a9e913ddf1c281a62dc3fb144aa543c483fb0 (diff)
add dropdown menu item to show book summary
Diffstat (limited to 'js/index.js')
-rw-r--r--js/index.js15
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();
+
+ });
}