summaryrefslogtreecommitdiff
path: root/web-ui/app/js/helpers
diff options
context:
space:
mode:
authorZara Gebru <zgebru@thoughtworks.com>2016-04-06 15:40:28 +0200
committerZara Gebru <zgebru@thoughtworks.com>2016-04-06 15:41:04 +0200
commit3835f94880cd6392191ba9008d5a1b516c78465a (patch)
tree92a24077bdfdc3ee663f89a1bfffe43efd8f481c /web-ui/app/js/helpers
parentdc389b7a1424ca39a88b783f77006536031d93bd (diff)
Issue #292: add fingerprint view in user settings
Diffstat (limited to 'web-ui/app/js/helpers')
-rw-r--r--web-ui/app/js/helpers/view_helper.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js
index e8d517a5..7e07df75 100644
--- a/web-ui/app/js/helpers/view_helper.js
+++ b/web-ui/app/js/helpers/view_helper.js
@@ -98,14 +98,21 @@ define(
}
+ function formatFingerPrint(fingerprint) {
+ fingerprint = fingerprint || '';
+ return fingerprint.replace(/(.{4})/g, '$1 ').trim();
+ }
+
Handlebars.registerHelper('formatDate', formatDate);
Handlebars.registerHelper('formatSize', formatSize);
Handlebars.registerHelper('formatStatusClasses', formatStatusClasses);
+ Handlebars.registerHelper('formatFingerPrint', formatFingerPrint);
return {
formatStatusClasses: formatStatusClasses,
formatSize: formatSize,
formatMailBody: formatMailBody,
+ formatFingerPrint: formatFingerPrint,
moveCaretToEndOfText: moveCaretToEndOfText,
quoteMail: quoteMail,
i18n: i18n