Compare commits

..

No commits in common. "7b7f866582900992bd99b8d2505387109c733911" and "6b58de00337c7f088c793d7db28eb56121110b14" have entirely different histories.

2 changed files with 2 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
require dirname(__FILE__) . "/../variables.php"; require "../variables.php";
$dbbooks = array(); $dbbooks = array();
$parsedbooks = array(); $parsedbooks = array();

View File

@ -2,7 +2,6 @@
var kindlemail = ""; var kindlemail = "";
var currentpath = ""; var currentpath = "";
var searchTimeout = null; var searchTimeout = null;
var lastSearch = "";
$(document).ready(function() { $(document).ready(function() {
getContents(); getContents();
@ -36,10 +35,6 @@ $(document).ready(function() {
$("#search").on("change keyup", function() { $("#search").on("change keyup", function() {
if ( searchTimeout ) clearTimeout(searchTimeout); if ( searchTimeout ) clearTimeout(searchTimeout);
if ( $("#search").val().length > 2 ) searchTimeout = setTimeout(getContents, 500); if ( $("#search").val().length > 2 ) searchTimeout = setTimeout(getContents, 500);
if ( ($("#search").val() == "") && (lastSearch != "") ) {
lastSearch = "";
getContents();
}
}); });
}); });
@ -55,10 +50,7 @@ function redirectToLogin() {
function getContents() { function getContents() {
if ( searchTimeout ) clearTimeout(searchTimeout); if ( searchTimeout ) clearTimeout(searchTimeout);
var data = {}; var data = {};
if ( $("#search").val() != "" ) { if ( $("#search").val() != "" ) data.search = $("#search").val();
data.search = $("#search").val();
lastSearch = data.search;
}
$.ajax({ $.ajax({
url : 'ajax/getcontents.php', url : 'ajax/getcontents.php',
data : data, data : data,