summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-03-06 11:37:16 +0300
committerAndrew Dolgov <[email protected]>2017-03-06 11:37:16 +0300
commitdf22bda667f72db5f3d684c7c078fc918be42bf9 (patch)
tree68b4af96623fd84daa86d45dcf740104fb8494d2
parent3cfa1d1cae9cc5dc1b4ca3210ae39a16e3c45ccf (diff)
do not scroll index to top when showing summary
-rw-r--r--index.php2
-rw-r--r--js/index.js2
-rw-r--r--js/offline.js4
3 files changed, 5 insertions, 3 deletions
diff --git a/index.php b/index.php
index d67a39e..e33fbd0 100644
--- a/index.php
+++ b/index.php
@@ -246,7 +246,7 @@
}
?> -->
- <li><a href="#" onclick="show_summary(this)"
+ <li><a href="#" onclick="return show_summary(this)"
data-book-id="<?php echo $line["id"] ?>">Summary</a></li>
<?php if ($line["epub_id"]) { ?>
diff --git a/js/index.js b/js/index.js
index ac418da..3faf152 100644
--- a/js/index.js
+++ b/js/index.js
@@ -166,5 +166,5 @@ function show_summary(elem) {
});
-
+ return false;
}
diff --git a/js/offline.js b/js/offline.js
index e0138fb..40e230b 100644
--- a/js/offline.js
+++ b/js/offline.js
@@ -112,7 +112,7 @@ function populate_list() {
"More..." + "<span class=\"caret\"></span></a>";
cell += "<ul class=\"dropdown-menu\">";
- cell += "<li><a href=\"#\" data-book-id=\""+info.id+"\" onclick=\"show_summary(this)\">Summary</a></li>";
+ cell += "<li><a href=\"#\" data-book-id=\""+info.id+"\" onclick=\"return show_summary(this)\">Summary</a></li>";
cell += "<li><a href=\"#\" data-book-id=\""+info.id+"\" onclick=\"offline_remove2(this)\">Remove offline data</a></li>";
cell += "</ul>";
@@ -177,6 +177,8 @@ function show_summary(elem) {
$("#summary-modal").modal();
});
+
+ return false;
}