summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-07-10 14:00:43 +0200
committerVincent Petry <pvince81@owncloud.com>2014-07-10 14:00:43 +0200
commit7af1a05266806a53acac6b1279760261fd239aa2 (patch)
tree42b8ee3711f8e1fd4dc5820bbe3282a68f9c56f4 /core
parent77792b5b7e068232360bade598fb0dd3c25bf5bb (diff)
parent6962505095b67eb56fa6bc4f20ed972dc7d02595 (diff)
downloadnextcloud-server-7af1a05266806a53acac6b1279760261fd239aa2.tar.gz
nextcloud-server-7af1a05266806a53acac6b1279760261fd239aa2.zip
Merge pull request #9519 from owncloud/search-bounce
debounce the search function
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js4
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);