From a45cfbc2d2754030510ac98607ca2cc53d750b57 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Fri, 9 Sep 2016 18:01:00 +0200 Subject: [PATCH 1/3] search design details --- apps/files/js/filelist.js | 2 +- apps/files/js/search.js | 4 ++-- apps/files_sharing/templates/list.php | 1 - core/search/js/search.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 26c6b34d09833..2e36e884346dd 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2427,7 +2427,7 @@ $('#searchresults .emptycontent').addClass('emptycontent-search'); if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) { this.$el.find('.nofilterresults').removeClass('hidden'). - find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false})); + find('h2').text(t('files', "No results in this folder for {filter}", {filter:this._filter}, null, {'escape': false})); } } else { $('#searchresults').removeClass('filter-empty'); diff --git a/apps/files/js/search.js b/apps/files/js/search.js index 625e4b13f4b72..fa79d695165f8 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -63,7 +63,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('
').text(result.path); + var $pathDiv = $('
').text(result.path.substr(1)); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); @@ -80,7 +80,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('
').text(result.path); + var $pathDiv = $('
').text(result.path.substr(1)); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php index f59cb7653d888..785b2bc72a4cc 100644 --- a/apps/files_sharing/templates/list.php +++ b/apps/files_sharing/templates/list.php @@ -8,7 +8,6 @@ diff --git a/core/search/js/search.js b/core/search/js/search.js index ef99cf7e9616e..e75060479b68b 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -217,7 +217,7 @@ $status.addClass('emptycontent').removeClass('status'); $status.html(''); $status.append(''); - $status.append('

' + t('core', 'No search results in other folders') + '

'); + $status.append('

' + t('core', 'No search results in other folders {filter}', {filter:this._filter}) + '

'); } else { $status.removeClass('emptycontent').addClass('status'); $status.text(n('core', '{count} search result in another folder', '{count} search results in other folders', count, {count:count})); From 35a7a4f3136ab35fbc31a983c2207cf9ecdffb1d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 5 Oct 2016 13:48:50 +0200 Subject: [PATCH 2/3] Use the correct query variable Signed-off-by: Joas Schilling --- core/search/js/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/search/js/search.js b/core/search/js/search.js index e75060479b68b..559fbcf9adf46 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -217,7 +217,7 @@ $status.addClass('emptycontent').removeClass('status'); $status.html(''); $status.append(''); - $status.append('

' + t('core', 'No search results in other folders {filter}', {filter:this._filter}) + '

'); + $status.append('

' + t('core', 'No search results in other folders {filter}', {filter:lastQuery}) + '

'); } else { $status.removeClass('emptycontent').addClass('status'); $status.text(n('core', '{count} search result in another folder', '{count} search results in other folders', count, {count:count})); From 1930aa3102b52258480c52998661802432c866b1 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Tue, 11 Oct 2016 14:21:37 +0200 Subject: [PATCH 3/3] Fix bold no results search text Fix wording --- apps/files/js/filelist.js | 3 ++- core/search/js/search.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 2e36e884346dd..09c35e0d061d0 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2426,8 +2426,9 @@ $('#searchresults').addClass('filter-empty'); $('#searchresults .emptycontent').addClass('emptycontent-search'); if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) { + var error = t('files', "No search results in other folders for '{tag}{filter}{endtag}'", {filter:this._filter}, null, {'escape': false}); this.$el.find('.nofilterresults').removeClass('hidden'). - find('h2').text(t('files', "No results in this folder for {filter}", {filter:this._filter}, null, {'escape': false})); + find('p').html(error.replace('{tag}', '').replace('{endtag}', '')); } } else { $('#searchresults').removeClass('filter-empty'); diff --git a/core/search/js/search.js b/core/search/js/search.js index 559fbcf9adf46..93b1961eea531 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -217,7 +217,8 @@ $status.addClass('emptycontent').removeClass('status'); $status.html(''); $status.append(''); - $status.append('

' + t('core', 'No search results in other folders {filter}', {filter:lastQuery}) + '

'); + var error = t('core', "No search results in other folders for '{tag}{filter}{endtag}'", {filter:lastQuery}); + $status.append('

' + error.replace('{tag}', '').replace('{endtag}', '') + '

'); } else { $status.removeClass('emptycontent').addClass('status'); $status.text(n('core', '{count} search result in another folder', '{count} search results in other folders', count, {count:count}));