diff options
author | Sergey Shliakhov <husband.sergey@gmail.com> | 2020-02-11 07:12:42 +0100 |
---|---|---|
committer | npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com> | 2020-04-30 07:17:47 +0000 |
commit | 09ecf4b4eb10cc1dc87dbcd91068dc92164e540d (patch) | |
tree | e067562cc7570ee70b475c70f38ab3f17befc114 /core/src | |
parent | a1c1b354fcb79153a78a658b758acd514089c9e1 (diff) | |
download | nextcloud-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.js | 3 |
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); } } |