diff options
| author | tim b <timb@camcompu.home> | 2010-08-03 23:37:25 -0700 |
|---|---|---|
| committer | tim b <timb@camcompu.home> | 2010-08-03 23:37:25 -0700 |
| commit | aa06b93d39c2a6b3a67bc91a01a9f86c315966a8 (patch) | |
| tree | 068757455a9849e1fc26afaacae8868730bfb688 /template/search_files.st | |
| parent | 537d5ddb033fda636df847be814af383c565bbf9 (diff) | |
| parent | 2a7b0ab6991051b917a4ee75435007f3fa06f5f3 (diff) | |
Merge branch 'master' of ssh://dump.fm/pichat/repo
Diffstat (limited to 'template/search_files.st')
| -rw-r--r-- | template/search_files.st | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/template/search_files.st b/template/search_files.st index b226ebf..9759f07 100644 --- a/template/search_files.st +++ b/template/search_files.st @@ -23,7 +23,9 @@ var term = "" var imagesPerPage = 25; var images = [] - + + var Search = {}; + function addScript(term){ jQuery("#search-script").remove() jQuery("head").append("<scr"+"ipt src='/cmd/ghettosearch/"+term+"' id='search-script'></sc"+"ript>") @@ -37,7 +39,7 @@ jQuery("#message").html(x) } - function searchError(error){ + Search.searchError = function(error){ setContent("") setMessage(error) } @@ -61,7 +63,7 @@ setContent(contentString) } - function searchResult(results){ + Search.searchResult = function(results){ images = [] var alreadyGot = {} if(results === null || results.length == 0) { @@ -112,15 +114,8 @@ } } - // only search every 800ms while someone is typing - function keyHandler(){ - if (keyHandler.timeout) clearTimeout(keyHandler.timeout); - keyHandler.timeout = setTimeout(doSearch, 800) - } - - jQuery("#search-query").keyup(keyHandler) - + jQuery("#search-query").keydown(ifEnter(doSearch)) </script> -</html>
\ No newline at end of file +</html> |
