summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-09-19 05:49:45 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-09-19 05:49:45 -0700
commit9f9eb1b08f7b677e1b64af4d101d974b6bb326f8 (patch)
treee3a82786971c884712e8cce142b8e11215e8eddf /core
parentae4775a68315c2aaab3f15c8baf8dbd6ee8ccf7a (diff)
parentc2e413e8528835929e6ca60ade0f5a3ad7a210bd (diff)
downloadnextcloud-server-9f9eb1b08f7b677e1b64af4d101d974b6bb326f8.tar.gz
nextcloud-server-9f9eb1b08f7b677e1b64af4d101d974b6bb326f8.zip
Merge pull request #4263 from owncloud/search_scrollto
initial scrollto implementation
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index cb7287c02ae..b7f7ff1ac15 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -723,11 +723,17 @@ $(document).ready(function(){
}
}else if(event.keyCode===27){//esc
OC.search.hide();
+ if (FileList && typeof FileList.unfilter === 'function') { //TODO add hook system
+ FileList.unfilter();
+ }
}else{
var query=$('#searchbox').val();
if(OC.search.lastQuery!==query){
OC.search.lastQuery=query;
OC.search.currentResult=-1;
+ if (FileList && typeof FileList.filter === 'function') { //TODO add hook system
+ FileList.filter(query);
+ }
if(query.length>2){
OC.search(query);
}else{
@@ -840,6 +846,13 @@ function formatDate(date){
return $.datepicker.formatDate(datepickerFormatDate, date)+' '+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes();
}
+// taken from http://stackoverflow.com/questions/1403888/get-url-parameter-with-jquery
+function getURLParameter(name) {
+ return decodeURI(
+ (RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1]
+ );
+}
+
/**
* takes an absolute timestamp and return a string with a human-friendly relative date
* @param int a Unix timestamp