From d31dbb23f431a72074874415eb95b6e7d42bb8e1 Mon Sep 17 00:00:00 2001 From: Matias Pando Date: Wed, 12 Nov 2014 17:54:18 -0300 Subject: [PATCH] Added spinner --- js/controllers/history.js | 11 ++++++++++- views/history.html | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/js/controllers/history.js b/js/controllers/history.js index 6f40c2b09..0e9f736d0 100644 --- a/js/controllers/history.js +++ b/js/controllers/history.js @@ -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 + '\"'; diff --git a/views/history.html b/views/history.html index 9b89d5669..cc1e1d957 100644 --- a/views/history.html +++ b/views/history.html @@ -101,7 +101,7 @@
- Generating file.... + Generating file...