summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-07-26 14:15:12 +0300
committerAndrew Dolgov <[email protected]>2017-07-26 14:15:12 +0300
commit73b159aa7864a29d2ed13f5b28382b37c649d840 (patch)
tree1a99f4d9cd92f904cb7dcaad6f6714dc68059b96 /index.php
parentd7d4b51384451a978637e147efe10a7cb4164772 (diff)
confirm removing book from favs
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/index.php b/index.php
index bfb5fe8..f7bf169 100644
--- a/index.php
+++ b/index.php
@@ -318,8 +318,10 @@
if ($found_id) {
$toggle_fav_prompt = "Remove from favorites";
+ $fav_attr = "1";
} else {
$toggle_fav_prompt = "Add to favorites";
+ $fav_attr = "0";
}
?>
@@ -327,6 +329,7 @@
data-book-id="<?php echo $line["id"] ?>">Summary</a></li>
<li><a href="#" onclick="return toggle_fav(this)"
+ data-is-fav="<?php echo $fav_attr ?>"
class="fav_item" data-book-id="<?php echo $line["id"] ?>">
<?php echo $toggle_fav_prompt ?></a></li>