allow apps to add translation for search result typeid

remotes/origin/ldap_group_count
Jörn Friedrich Dreyer 10 years ago
parent 2801f0f222
commit 7c29645f22

@ -585,6 +585,13 @@ OC.search.customResults={};
OC.search.currentResult=-1;
OC.search.lastQuery='';
OC.search.lastResults={};
//translations for result type ids, can be extended by apps
OC.search.resultTypes={
file: t('core','File'),
folder: t('core','Folder'),
image: t('core','Image'),
audio: t('core','Audio')
};
OC.addStyle.loaded=[];
OC.addScript.loaded=[];

@ -64,7 +64,7 @@ OC.search.showResults=function(results){
row.data('index',index);
if (i === 0){
var typeName = typeid.charAt(0).toUpperCase() + typeid.slice(1);
var typeName = OC.search.resultTypes[typeid];
row.children('td.type').text(t('lib', typeName));
}
row.find('td.result div.name').text(type[i].name);

Loading…
Cancel
Save