Browse Source

UI-2378: change download button mechanism in call logs to open a new tab so it doesn't change the URL in case of errors

4.3
Jean-Roch Maitre 9 years ago
parent
commit
95e93937fc
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      submodules/callLogs/callLogs.js

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

@ -125,11 +125,10 @@ define(function(require){
template.find('.download-csv').on('click', function(e) {
var fromDateTimestamp = monster.util.dateToBeginningOfGregorianDay(fromDate),
toDateTimestamp = monster.util.dateToEndOfGregorianDay(toDate);
toDateTimestamp = monster.util.dateToEndOfGregorianDay(toDate),
url = self.apiUrl + 'accounts/' + self.accountId + '/cdrs?created_from=' + fromDateTimestamp + '&created_to=' + toDateTimestamp + '&accept=text/csv&auth_token=' + self.authToken;
window.location.href = self.apiUrl + 'accounts/' + self.accountId
+ '/cdrs?created_from=' + fromDateTimestamp + '&created_to=' + toDateTimestamp
+ '&accept=text/csv&auth_token=' + self.authToken;
window.open(url,'_blank');
});
template.find('.search-div input.search-query').on('keyup', function(e) {


Loading…
Cancel
Save