aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-07-31 22:24:52 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-09-17 18:40:51 +0200
commitb40925ae1747ae44a52fb1f8dcf7645d022c6f13 (patch)
tree2f385e6b79de01305aa718c197fdc3c85e5ff4cd /lib
parent9d18e16c77e8c2690dd23dd19ca1f8e1968161c8 (diff)
downloadnextcloud-server-b40925ae1747ae44a52fb1f8dcf7645d022c6f13.tar.gz
nextcloud-server-b40925ae1747ae44a52fb1f8dcf7645d022c6f13.zip
initial scrollto implementation:
use places/folder icon, move link construction to JS, only show icon on hover, use 'searchresult' as css class name, add filter/unfilter methods, highlight searched files in current filelist only filter when correct FileList is present
Diffstat (limited to 'lib')
-rw-r--r--lib/search/provider/file.php3
-rw-r--r--lib/search/result.php4
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index 4d88c2a87f1..9bd50931517 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -10,6 +10,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
$mime = $fileData['mimetype'];
$name = basename($path);
+ $container = dirname($path);
$text = '';
$skip = false;
if($mime=='httpd/unix-directory') {
@@ -37,7 +38,7 @@ class OC_Search_Provider_File extends OC_Search_Provider{
}
}
if(!$skip) {
- $results[] = new OC_Search_Result($name, $text, $link, $type);
+ $results[] = new OC_Search_Result($name, $text, $link, $type, $container);
}
}
return $results;
diff --git a/lib/search/result.php b/lib/search/result.php
index 08beaea151c..42275c2df11 100644
--- a/lib/search/result.php
+++ b/lib/search/result.php
@@ -7,6 +7,7 @@ class OC_Search_Result{
public $text;
public $link;
public $type;
+ public $container;
/**
* create a new search result
@@ -15,10 +16,11 @@ class OC_Search_Result{
* @param string $link link for the result
* @param string $type the type of result as human readable string ('File', 'Music', etc)
*/
- public function __construct($name, $text, $link, $type) {
+ public function __construct($name, $text, $link, $type, $container) {
$this->name=$name;
$this->text=$text;
$this->link=$link;
$this->type=$type;
+ $this->container=$container;
}
}