From b03755c0ec3dedc15a5dfbeceb045a28a04f8006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 17 Sep 2013 17:29:22 +0200 Subject: [PATCH] fix minor typos --- search/js/result.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/search/js/result.js b/search/js/result.js index 780f513edc..856330414a 100644 --- a/search/js/result.js +++ b/search/js/result.js @@ -105,3 +105,28 @@ OC.search.renderCurrent=function(){ $(result).addClass('current'); } }; + +// +// customize search results, currently replaces a technical type with a more human friendly version +// TODO implement search result renderers instead of changing results after adding them to the DOM +// +OC.search.customResults.file = function (row, item) { + if(row.children('td.type').text() === 'file') { + row.children('td.type').text(t('lib','Files')); + }; +} +OC.search.customResults.folder = function (row, item) { + if(row.children('td.type').text() === 'folder') { + row.children('td.type').text(t('lib','Folders')); + }; +} +OC.search.customResults.image = function (row, item) { + if(row.children('td.type').text() === 'image') { + row.children('td.type').text(t('lib','Images')); + }; +} +OC.search.customResults.audio = function (row, item) { + if(row.children('td.type').text() === 'audio') { + row.children('td.type').text(t('lib','Audio')); + }; +}