diff --git a/www/js/AssetTypesController.js b/www/js/AssetTypesController.js index 040742dd1..4bc19d32c 100644 --- a/www/js/AssetTypesController.js +++ b/www/js/AssetTypesController.js @@ -207,21 +207,28 @@ angular.module('omniwallet') $scope.currencyName = currency.symbol == "BTC" ? "Bitcoin" : currency.symbol == "MSC" ? "Mastercoin" : currency.symbol == "TMSC" ? "Test Mastercoin" : currency.name; } }); - var modalInstance = $modal.open({ - resolve: { - currencySymbol: function() { - return currencySymbol; - }, - balances: function() { - return getAssetBalances(currencySymbol); - }, - currencyName: function() { - return $scope.currencyName; - } - }, - templateUrl: '/partials/currency_detail_modal.html', - controller: CurrencyDetailModal - }); + if (!$scope.modalOpened) { + $scope.modalOpened = true; + var modalInstance = $modal.open({ + resolve: { + currencySymbol: function() { + return currencySymbol; + }, + balances: function() { + return getAssetBalances(currencySymbol); + }, + currencyName: function() { + return $scope.currencyName; + } + }, + templateUrl: '/partials/currency_detail_modal.html', + controller: CurrencyDetailModal + }); + modalInstance.result.then(function(){}, + function(){ + $scope.modalOpened = false; + }); + } }; function updateGraph() { diff --git a/www/js/WalletAddressesController.js b/www/js/WalletAddressesController.js index 3da6d0f97..6a6027890 100644 --- a/www/js/WalletAddressesController.js +++ b/www/js/WalletAddressesController.js @@ -154,20 +154,25 @@ angular.module('omniwallet') }); $scope.openDeleteConfirmForm = function(addritem) { - var modalInstance = $modal.open({ - templateUrl: '/partials/delete_address_modal.html', - controller: DeleteBtcAddressModal, - resolve: { - address: function() { - return addritem; - } - } - }); - - modalInstance.result.then(function() { - $injector.get('userService').removeAddress(addritem.address); - $scope.refresh(); - }, function() {}); + if (!$scope.modalOpened) { + $scope.modalOpened = true; + var modalInstance = $modal.open({ + templateUrl: '/partials/delete_address_modal.html', + controller: DeleteBtcAddressModal, + resolve: { + address: function() { + return addritem; + } + } + }); + modalInstance.result.then(function() { + $injector.get('userService').removeAddress(addritem.address); + $scope.refresh(); + }, + function() { + modalOpened=false; + }); + } }; $scope.refresh = function() { diff --git a/www/js/controller.js b/www/js/controller.js index dd499fed0..8134cc999 100644 --- a/www/js/controller.js +++ b/www/js/controller.js @@ -193,10 +193,17 @@ function NavigationController($scope, $http, $modal, userService) { }; $scope.openUUIDmodal = function() { - $modal.open({ + if (!$scope.modalOpened) { + $scope.modalOpened = true; + var modalInstance = $modal.open({ templateUrl: '/partials/wallet_uuid_modal.html', controller: WalletController - }); + }); + modalInstance.result.then(function(){}, + function(){ + $scope.modalOpened = false; + }); + } }; $scope.openNewUUIDmodal = function() { diff --git a/www/partials/wallet_addresses.html b/www/partials/wallet_addresses.html index e437cdee9..1b62326a6 100644 --- a/www/partials/wallet_addresses.html +++ b/www/partials/wallet_addresses.html @@ -3,5 +3,5 @@
- + diff --git a/www/partials/wallet_overview.html b/www/partials/wallet_overview.html index 7e1b42cda..a4f162046 100644 --- a/www/partials/wallet_overview.html +++ b/www/partials/wallet_overview.html @@ -23,7 +23,7 @@