aboutsummaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorSergey Shliakhov <husband.sergey@gmail.com>2020-02-11 07:12:42 +0100
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>2020-04-30 07:17:47 +0000
commit09ecf4b4eb10cc1dc87dbcd91068dc92164e540d (patch)
treee067562cc7570ee70b475c70f38ab3f17befc114 /core/src
parenta1c1b354fcb79153a78a658b758acd514089c9e1 (diff)
downloadnextcloud-server-09ecf4b4eb10cc1dc87dbcd91068dc92164e540d.tar.gz
nextcloud-server-09ecf4b4eb10cc1dc87dbcd91068dc92164e540d.zip
Generate legacy image placeholder text by taking first letters
https://github.com/nextcloud/server/issues/19335 Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/jquery/placeholder.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/jquery/placeholder.js b/core/src/jquery/placeholder.js
index 029071c4d99..ac0aacdcf98 100644
--- a/core/src/jquery/placeholder.js
+++ b/core/src/jquery/placeholder.js
@@ -158,7 +158,8 @@ $.fn.imageplaceholder = function(seed, text, size) {
this.css('font-size', (height * 0.55) + 'px')
if (seed !== null && seed.length) {
- this.html(text[0].toUpperCase())
+ var placeholderText = text.split(' ', 2).map((word) => word[0].toUpperCase()).join('')
+ this.html(placeholderText);
}
}