Fix displaying and searching with multiple authors

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-09-30 11:15:56 +02:00
parent 3a5022ad5b
commit acd90669ff
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 7 additions and 0 deletions

View File

@ -183,6 +183,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
app.previewAsIcon = true; app.previewAsIcon = true;
} }
if (_.isArray(app.author)) {
app.author = app.author.join(', ');
}
var html = template(app); var html = template(app);
if (selector) { if (selector) {
selector.html(html); selector.html(html);
@ -513,6 +517,9 @@ OC.Settings.Apps = OC.Settings.Apps || {
// Author Name // Author Name
apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) { apps = apps.concat(_.filter(OC.Settings.Apps.State.apps, function (app) {
if (_.isArray(app.author)) {
return app.author.join(', ').toLowerCase().indexOf(query) !== -1;
}
return app.author.toLowerCase().indexOf(query) !== -1; return app.author.toLowerCase().indexOf(query) !== -1;
})); }));