Browse Source

UI-1497: Now hiding the Call Report link when the callReportAddress is not specified

4.3
Maxime Roux 11 years ago
parent
commit
75b09ac288
4 changed files with 16 additions and 6 deletions
  1. +3
    -0
      submodules/callLogs/callLogs.css
  2. +5
    -4
      submodules/callLogs/callLogs.js
  3. +5
    -1
      views/callLogs-cdrsList.html
  4. +3
    -1
      views/callLogs-layout.html

+ 3
- 0
submodules/callLogs/callLogs.css View File

@ -155,6 +155,9 @@
#call_logs_container .grid-cell.hangup {
width: 15%;
}
#call_logs_container .call-logs-grid.no-report-link .grid-cell.hangup {
width: 25%;
}
#call_logs_container .grid-cell.full-width {
width: 100%;
}


+ 5
- 4
submodules/callLogs/callLogs.js View File

@ -33,7 +33,8 @@ define(function(require){
type: type || 'today',
fromDate: fromDate,
toDate: toDate,
showFilteredDates: ['thisMonth', 'thisWeek'].indexOf(type) >= 0
showFilteredDates: ['thisMonth', 'thisWeek'].indexOf(type) >= 0,
showReport: monster.config.whitelabel.callReportEmail ? true : false
};
// Reset variables used to link A-Legs & B-Legs sent by different pages in the API
@ -45,7 +46,7 @@ define(function(require){
template = $(monster.template(self, 'callLogs-layout', dataTemplate));
if(cdrs && cdrs.length) {
var cdrsTemplate = $(monster.template(self, 'callLogs-cdrsList', {cdrs: cdrs}));
var cdrsTemplate = $(monster.template(self, 'callLogs-cdrsList', {cdrs: cdrs, showReport: monster.config.whitelabel.callReportEmail ? true : false}));
template.find('.call-logs-grid .grid-row-container')
.append(cdrsTemplate);
}
@ -201,7 +202,7 @@ define(function(require){
loaderDiv.find('.loading-message > i').toggleClass('fa-spin');
self.callLogsGetCdrs(fromDate, toDate, function(newCdrs, nextStartKey) {
newCdrs = self.callLogsFormatCdrs(newCdrs);
cdrsTemplate = $(monster.template(self, 'callLogs-cdrsList', {cdrs: newCdrs}));
cdrsTemplate = $(monster.template(self, 'callLogs-cdrsList', {cdrs: newCdrs, showReport: monster.config.whitelabel.callReportEmail ? true : false}));
startKey = nextStartKey;
if(!startKey) {
@ -365,7 +366,7 @@ define(function(require){
hangupCause: cdr.hangup_cause,
hangupHelp: hangupHelp,
isOutboundCall: isOutboundCall,
mailtoLink: "mailto:support@2600hz.com"
mailtoLink: "mailto:" + monster.config.whitelabel.callReportEmail
+ "?subject=Call Report: " + cdr.call_id
+ "&body=Please describe the details of the issue:%0D%0A%0D%0A"
+ "%0D%0A____________________________________________________________%0D%0A"


+ 5
- 1
views/callLogs-cdrsList.html View File

@ -45,11 +45,13 @@
<i class="fa fa-cog fa-lg"></i>
</div>
</div>
{{#if ../showReport}}
<div class="grid-cell report">
<div class="sub-cell single-cell">
<a class="monster-link" href="{{this.mailtoLink}}">{{../i18n.callLogs.reportCall}}</a>
<a class="monster-link" href="{{this.mailtoLink}}">{{../../i18n.callLogs.reportCall}}</a>
</div>
</div>
{{/if}}
</div>
{{#each this.bLegs}}
<div class="grid-row b-leg" data-id={{this.id}}>
@ -91,9 +93,11 @@
<i class="fa fa-cog fa-lg"></i>
</div>
</div>
{{#if ../../showReport}}
<div class="grid-cell report">
<div class="sub-cell single-cell"></div>
</div>
{{/if}}
</div>
{{/each}}
</div>

+ 3
- 1
views/callLogs-layout.html View File

@ -42,7 +42,7 @@
</div>
<div class="call-logs-content">
<div class="call-logs-grid">
<div class="call-logs-grid{{#unless showReport}} no-report-link{{/unless}}">
<div class="grid-row-group">
<div class="grid-row header-row">
<div class="grid-cell direction">
@ -75,10 +75,12 @@
<div class="sub-cell cell-top">{{i18n.callLogs.gridHeaders.details1}}</div>
<div class="sub-cell cell-bottom">{{i18n.callLogs.gridHeaders.details2}}</div>
</div>
{{#if showReport}}
<div class="grid-cell report">
<div class="sub-cell cell-top">{{i18n.callLogs.gridHeaders.report1}}</div>
<div class="sub-cell cell-bottom">{{i18n.callLogs.gridHeaders.report2}}</div>
</div>
{{/if}}
</div>
</div>
<div class="grid-row no-match">


Loading…
Cancel
Save