diff options
Diffstat (limited to 'js/app/controllers/import.js')
-rw-r--r-- | js/app/controllers/import.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/js/app/controllers/import.js b/js/app/controllers/import.js index 7014e9ea..0fc9dbea 100644 --- a/js/app/controllers/import.js +++ b/js/app/controllers/import.js @@ -31,7 +31,7 @@ * Controller of the passmanApp */ angular.module('passmanApp') - .controller('ImportCtrl', ['$scope', '$window', 'CredentialService', 'VaultService', 'FileService', 'EncryptService', '$translate', function ($scope, $window, CredentialService, VaultService, FileService, EncryptService, $translate) { + .controller('ImportCtrl', ['$scope', '$rootScope', '$window', 'CredentialService', 'VaultService', 'FileService', 'EncryptService', '$translate', function ($scope, $rootScope, $window, CredentialService, VaultService, FileService, EncryptService, $translate) { $scope.available_importers = []; $scope.active_vault = VaultService.getActiveVault(); @@ -109,6 +109,7 @@ total: parsed_data.length }; _log($translate.instant('done')); + $rootScope.refresh(); } } }); @@ -130,7 +131,7 @@ process.setRequiredServices(FileService, EncryptService); } - process = process.readFile(file_data).then(function (parseddata) { + process.readFile(file_data).then(function (parseddata) { parsed_data = parseddata; $scope.file_read_progress = { percent: 100, @@ -144,14 +145,10 @@ } else { // @TODO Show message no data found } + }).progress(function (progress) { + $scope.file_read_progress = progress; + $scope.$digest(); }); - - if ($scope.selectedImporter.id !== 'passmanJson'){ - process.progress(function (progress) { - $scope.file_read_progress = progress; - $scope.$digest(); - }); - } } }; |