Added spinner
This commit is contained in:
parent
11e5bb4305
commit
d31dbb23f4
2 changed files with 11 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
|
||||
$rootScope.title = 'History';
|
||||
$scope.loading = false;
|
||||
$scope.generating = false;
|
||||
$scope.lastShowed = false;
|
||||
|
||||
$scope.currentPage = 1;
|
||||
|
|
@ -36,6 +37,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
var w = $rootScope.wallet;
|
||||
if (!w) return;
|
||||
|
||||
$scope.generating = true;
|
||||
var data = w.getTransactionHistory(null, function(err, res) {
|
||||
if (err) throw err;
|
||||
|
||||
|
|
@ -60,7 +62,8 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
link.setAttribute("download", filename);
|
||||
|
||||
link.click();
|
||||
|
||||
$scope.generating = false;
|
||||
$scope.$digest();
|
||||
|
||||
function formatDate(date) {
|
||||
var dateObj = new Date(date);
|
||||
|
|
@ -77,6 +80,12 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
|
||||
function formatString(str) {
|
||||
if (!str) return '';
|
||||
|
||||
if (str.indexOf('"') !== -1) {
|
||||
//replace all
|
||||
str = str.replace(new RegExp('"', 'g'), '\'');
|
||||
}
|
||||
|
||||
//escaping commas
|
||||
str = '\"' + str + '\"';
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
</div>
|
||||
<div ng-if="generating" class="right size-12">
|
||||
<i class="fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
<span translate>Generating file....</span>
|
||||
<span translate>Generating file...</span>
|
||||
</div>
|
||||
<div ng-if="!generating" class="right size-12">
|
||||
<a class="text-gray" href="#!/history" ng-click="downloadHistory();">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue