From a47dcf7c1cb5b47aa7616be086fa109320db6f18 Mon Sep 17 00:00:00 2001 From: Ricardo Merino Date: Fri, 26 Oct 2018 11:49:24 -0600 Subject: [PATCH] UI-3152: show hangup cause label properly (#93) * Get hangup cause label from active lang use capitalize instead of lowercase on css * CR: remove unused statement and text display improvements * Styling hangup cause only * CSS indentation * prevent cell content overflow --- submodules/callLogs/callLogs.css | 11 +++++++++-- submodules/callLogs/callLogs.js | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/submodules/callLogs/callLogs.css b/submodules/callLogs/callLogs.css index 854187c..dd415b8 100644 --- a/submodules/callLogs/callLogs.css +++ b/submodules/callLogs/callLogs.css @@ -181,7 +181,7 @@ width: 100%; } #call_logs_container .grid-row:not(.header-row) .grid-cell.hangup .cause-title { - text-transform: lowercase; + text-transform: capitalize; font-size: 12px; font-style: italic; } @@ -203,6 +203,13 @@ line-height: 40px; } +#call_logs_container .hangup .sub-cell.single-cell { + display: flex; + justify-content: center; + align-items: center; + line-height: normal; +} + #call_logs_container .call-logs-loader { margin-top: 10px; padding: 10px; @@ -246,4 +253,4 @@ body.colorblind #call_logs_container .grid-cell.direction .monster-green { } body.colorblind #call_logs_container .grid-cell.direction .monster-orange { color: #222 !important; -} \ No newline at end of file +} diff --git a/submodules/callLogs/callLogs.js b/submodules/callLogs/callLogs.js index b060699..929c5a4 100644 --- a/submodules/callLogs/callLogs.js +++ b/submodules/callLogs/callLogs.js @@ -403,7 +403,10 @@ define(function(require) { toName: cdr.callee_id_name, toNumber: cdr.callee_id_number || ('request' in cdr) ? cdr.request.replace(/@.*/, '') : cdr.to.replace(/@.*/, ''), duration: durationMin + ':' + durationSec, - hangupCause: cdr.hangup_cause, + hangupCause: _.chain(self.i18n.active().hangupCauses[cdr.hangup_cause]) + .get('label', cdr.hangup_cause) + .lowerCase() + .value(), hangupHelp: hangupHelp, isOutboundCall: isOutboundCall, mailtoLink: 'mailto:' + monster.config.whitelabel.callReportEmail