summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-12-17 18:49:39 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 10:28:41 +0100
commit606f802b7be0cb6f2f6d99c547e432bb8cd27994 (patch)
treec6e022168c4f1dc761e76ab8be78ba123c19f5f9 /apps/files/js/filelist.js
parent0e9b05b7012844e348d36b5b35e1c50487a3bbc4 (diff)
downloadnextcloud-server-606f802b7be0cb6f2f6d99c547e432bb8cd27994.tar.gz
nextcloud-server-606f802b7be0cb6f2f6d99c547e432bb8cd27994.zip
move search results below filelist, show hint when results are off screen, use js plugin mechanism
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js15
1 files changed, 4 insertions, 11 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 09cb3d3287d..08017e3fef1 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1640,21 +1640,14 @@
},
filter:function(query) {
this.$fileList.find('tr').each(function(i,e) {
- if ($(e).data('file').toString().toLowerCase().indexOf(query.toLowerCase()) !== -1) {
- $(e).addClass("searchresult");
- } else {
- $(e).removeClass("searchresult");
+ if ($(e).data('file').toString().toLowerCase().indexOf(query.toLowerCase()) === -1) {
+ $(e).hide();
}
});
- //do not use scrollto to prevent removing searchresult css class
- var first = this.$fileList.find('tr.searchresult').first();
- if (first.exists()) {
- $(window).scrollTop(first.position().top);
- }
},
unfilter:function() {
- this.$fileList.find('tr.searchresult').each(function(i,e) {
- $(e).removeClass("searchresult");
+ this.$fileList.find('tr:hidden').each(function(i,e) {
+ $(e).show();
});
},
/**