[Pkg-owncloud-commits] [owncloud] 59/70: debounce the search function
David Prévot
taffit at moszumanska.debian.org
Mon Jul 14 17:38:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 31d8bce383c811b584326c3aee6187d191968301
Author: Robin Appelman <icewind at owncloud.com>
Date: Tue Jul 8 15:42:58 2014 +0200
debounce the search function
---
core/js/js.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/js/js.js b/core/js/js.js
index 72b65f4..4a9a5ce 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list