summaryrefslogtreecommitdiffstats
path: root/search
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-31 00:50:04 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-31 00:50:04 +0200
commite6821e9d7c716d4808c11789ff7065430213f2d0 (patch)
tree12cfec0c09ce218a617a9cb7a7b733ac8c1d4dc1 /search
parent0503c3499ee03bcb220416ac1162cafcf5b38bc4 (diff)
downloadnextcloud-server-e6821e9d7c716d4808c11789ff7065430213f2d0.tar.gz
nextcloud-server-e6821e9d7c716d4808c11789ff7065430213f2d0.zip
Show play and add-to-playlist buttons in instant search results
for now this only works from inside the media app
Diffstat (limited to 'search')
-rw-r--r--search/js/result.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/search/js/result.js b/search/js/result.js
index b550d4d314d..cb5ec31cd31 100644
--- a/search/js/result.js
+++ b/search/js/result.js
@@ -43,6 +43,9 @@ OC.search.showResults=function(results){
row.find('td.result a').attr('href',type[0].link);
row.find('td.result div.name').text(type[0].name);
row.find('td.result div.text').text(type[0].text);
+ if(OC.search.customResults[name]){//give plugins the ability to customize the entries in here
+ OC.search.customResults[name](row,type[0]);
+ }
$('#searchresults tbody').append(row);
for(var i=1;i<type.length;i++){
var row=$('#searchresults tr.template').clone();
@@ -51,6 +54,9 @@ OC.search.showResults=function(results){
row.find('td.result a').attr('href',type[i].link);
row.find('td.result div.name').text(type[i].name);
row.find('td.result div.text').text(type[i].text);
+ if(OC.search.customResults[name]){//give plugins the ability to customize the entries in here
+ OC.search.customResults[name](row,type[i]);
+ }
$('#searchresults tbody').append(row);
}
}