Browse Source

remove tooltips, bithack epub.js to remove hardcoded 20px content padding (what the fuck)

Andrew Dolgov 10 months ago
parent
commit
c0fd1123ba
5 changed files with 2 additions and 67 deletions
  1. 0 3
      index.php
  2. 0 41
      js/index.js
  3. 0 19
      js/offline.js
  4. 1 1
      lib/epub.js
  5. 1 3
      worker.js

+ 0 - 3
index.php

@@ -52,7 +52,6 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1.0">
 	<link href="lib/bootstrap/v3/css/bootstrap.min.css" rel="stylesheet" media="screen">
 	<link href="lib/bootstrap/v3/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
-	<link href="lib/qtip2/jquery.qtip.min.css" rel="stylesheet" media="screen">
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 	<script src="lib/bootstrap/v3/js/jquery.js"></script>
 	<script src="lib/bootstrap/v3/js/bootstrap.min.js"></script>
@@ -60,7 +59,6 @@
 	<script src="lib/fetch.js"></script>
 	<script src="lib/holder.min.js"></script>
 	<script src="lib/localforage.min.js"></script>
-	<script src="lib/qtip2/jquery.qtip.min.js"></script>
 	<title>The Epube</title>
 	<link type="text/css" rel="stylesheet" media="screen" href="css/index.css" />
 	<link rel="shortcut icon" type="image/png" href="img/favicon.png" />
@@ -150,7 +148,6 @@
 
 		mark_offline_books();
 		cache_refresh();
-		init_tooltips();
 
 	});
 </script>

+ 0 - 41
js/index.js

@@ -142,47 +142,6 @@ function offline_cache(bookId, callback) {
 	});
 }
 
-function init_tooltips() {
-
-	$('.index_cell img').qtip({
-		position: {
-			target: 'mouse',
-			adjust: {
-				mouse: false
-			}
-		},
-		style: {
-			classes: 'qtip-light qtip-custom'
-		},
-		show: {
-			delay: 1000
-		},
-		hide: 'unfocus mouseleave',
-		content: {
-			text: function(event, api) {
-				$.ajax({
-					url: 'backend.php?op=getinfo&id=' + $(this).attr('data-book-id')
-				})
-				.then(function(content) {
-
-					api.set('content.title', content.title);
-
-					if (content.comment) {
-						api.set('content.text',
-						  	content.comment);
-					} else {
-						api.set('content.text', 'No description available');
-					}
-				}, function(xhr, status, error) {
-					api.set('content.text', status + ': ' + error);
-				});
-
-				return 'Loading...';
-			}
-		}
-	});
-}
-
 function show_summary(elem) {
 	var id = elem.getAttribute("data-book-id");
 

+ 0 - 19
js/offline.js

@@ -126,25 +126,6 @@ function populate_list() {
 					var cell = $(cell);
 
 					if (cover) {
-						cell.find("img").attr("src", cover).qtip({
-							position: {
-								target: 'mouse',
-								adjust: {
-									mouse: false
-								}
-							},
-							style: {
-								classes: 'qtip-light qtip-custom'
-							},
-							show: {
-								delay: 1000
-							},
-							hide: 'unfocus mouseleave',
-							content: {
-								text: info.comment ? info.comment : "No description available",
-								title: info.title
-							}
-						});
 
 						cell.find(".series_link")
 							.attr("title", info.series_name + " [" + info.series_index  + "]")

File diff suppressed because it is too large
+ 1 - 1
lib/epub.js


+ 1 - 3
worker.js

@@ -29,9 +29,7 @@ const CACHE_URLS = [
 			'lib/bootstrap/v3/css/bootstrap.min.css',
 			'lib/bootstrap/v3/js/jquery.js',
 			'lib/bootstrap/v3/js/bootstrap.min.js',
-			'lib/bootstrap/v3/fonts/glyphicons-halflings-regular.woff2',
-			'lib/qtip2/jquery.qtip.min.css',
-			'lib/qtip2/jquery.qtip.min.js',
+			'lib/bootstrap/v3/fonts/glyphicons-halflings-regular.woff2'
 		];