diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-20 10:58:07 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-26 16:15:15 +0100 |
commit | 618a08aa00160c6b709a0da2bf8566b9002073ff (patch) | |
tree | 0d19e34eeced7a1680a05054f9e5b0f937466f14 /settings | |
parent | f3a77c7d997056fd166d500a7c855288e4adf163 (diff) | |
download | nextcloud-server-618a08aa00160c6b709a0da2bf8566b9002073ff.tar.gz nextcloud-server-618a08aa00160c6b709a0da2bf8566b9002073ff.zip |
Fix backspace in search and empty content message
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/apps.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js index fd2b5a3c918..0734ad54ae0 100644 --- a/settings/js/apps.js +++ b/settings/js/apps.js @@ -116,7 +116,7 @@ OC.Settings.Apps = OC.Settings.Apps || { }); } else { $('#apps-list').addClass('hidden'); - $('#apps-list-empty').removeClass('hidden'); + $('#apps-list-empty').removeClass('hidden').find('h2').text(t('settings', 'No apps found for your version')); } $('.app-level .official').tipsy({fallback: t('settings', 'Official apps are developed by and within the ownCloud community. They offer functionality central to ownCloud and are ready for production use.')}); @@ -416,12 +416,14 @@ OC.Settings.Apps = OC.Settings.Apps || { filter: function(query) { var $appList = $('#apps-list'), $emptyList = $('#apps-list-empty'); + $appList.removeClass('hidden'); + $appList.find('.section').removeClass('hidden'); + $emptyList.addClass('hidden'); + if (query === '') { - $appList.find('.section').removeClass('hidden'); - $appList.removeClass('hidden'); - $emptyList.addClass('hidden'); return; } + query = query.toLowerCase(); $appList.find('.section').addClass('hidden'); @@ -462,6 +464,9 @@ OC.Settings.Apps = OC.Settings.Apps || { if (apps.length === 0) { $appList.addClass('hidden'); $emptyList.removeClass('hidden'); + $emptyList.removeClass('hidden').find('h2').text(t('settings', 'No apps found for "{query}"', { + query: query + })); } else { _.each(apps, function (app) { $('#app-' + app.id).removeClass('hidden'); |