diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-07-08 15:42:58 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-07-08 15:42:58 +0200 |
commit | 6962505095b67eb56fa6bc4f20ed972dc7d02595 (patch) | |
tree | 771408cea110d163c6c1ff46cc0bb136180dc7fe /core | |
parent | c777910a8bedacf7c08bef27280061bae96db773 (diff) | |
download | nextcloud-server-6962505095b67eb56fa6bc4f20ed972dc7d02595.tar.gz nextcloud-server-6962505095b67eb56fa6bc4f20ed972dc7d02595.zip |
debounce the search function
Diffstat (limited to 'core')
-rw-r--r-- | core/js/js.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index 72b65f41a16..4a9a5ce82ff 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -380,7 +380,7 @@ var OC={ * Do a search query and display the results * @param {string} query the search query */ - search:function(query){ + search: _.debounce(function(query){ if(query){ OC.addStyle('search','results'); $.getJSON(OC.filePath('search','ajax','search.php')+'?query='+encodeURIComponent(query), function(results){ @@ -388,7 +388,7 @@ var OC={ OC.search.showResults(results); }); } - }, + }, 500), dialogs:OCdialogs, mtime2date:function(mtime) { mtime = parseInt(mtime,10); |