Compare commits
No commits in common. "7b7f866582900992bd99b8d2505387109c733911" and "6b58de00337c7f088c793d7db28eb56121110b14" have entirely different histories.
7b7f866582
...
6b58de0033
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require dirname(__FILE__) . "/../variables.php";
|
require "../variables.php";
|
||||||
|
|
||||||
$dbbooks = array();
|
$dbbooks = array();
|
||||||
$parsedbooks = array();
|
$parsedbooks = array();
|
||||||
|
|
10
js/books.js
10
js/books.js
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user