From 4c10389121a32185bf5d0587ac90253eb02b92e4 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 9 Aug 2014 18:59:58 +0000 Subject: [PATCH 1/5] issue 734 --- api/get_balance.py | 0 app.sh | 2 +- etc/nginx/sites-available/default | 2 +- www/js/AssetTypesController.js | 37 +++++++++++++++++------------ www/js/WalletAddressesController.js | 33 ++++++++++++++----------- www/js/controller.js | 11 +++++++-- www/partials/wallet_addresses.html | 2 +- www/partials/wallet_overview.html | 2 +- 8 files changed, 54 insertions(+), 35 deletions(-) mode change 100644 => 100755 api/get_balance.py mode change 100644 => 100755 etc/nginx/sites-available/default diff --git a/api/get_balance.py b/api/get_balance.py old mode 100644 new mode 100755 diff --git a/app.sh b/app.sh index 52651504a..080f7e405 100755 --- a/app.sh +++ b/app.sh @@ -57,7 +57,7 @@ do if [[ "$OSTYPE" == "darwin"* ]]; then uwsgi -s 127.0.0.1:1088 -p 8 -M --vhost --enable-threads --logto $DATADIR/apps.log & else - uwsgi -s 127.0.0.1:1088 -p 8 -M --vhost --enable-threads --plugin $PYTHONBIN --logto $DATADIR/apps.log & + uwsgi -s 127.0.0.1:1088 -p 2 -M --vhost --enable-threads --plugin $PYTHONBIN --logto $DATADIR/apps.log & fi SERVER_PID=$! fi diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default old mode 100644 new mode 100755 index d376d1ad5..d52a196c2 --- a/etc/nginx/sites-available/default +++ b/etc/nginx/sites-available/default @@ -26,7 +26,7 @@ server { add_header Expires "0"; ## Set this to reflect the location of the www directory within the omniwallet repo. - root /home/myUser/omniwallet/www/; + root /home/ubuntu/omniwallet/www/; index index.htm index.html; #Re-route nested routed through index 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 d829d46f1..d9f0c179d 100644 --- a/www/js/controller.js +++ b/www/js/controller.js @@ -192,10 +192,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 @@

Updating...




-
+
From 619f618cd53219b2177cf0ed10dbc56f87cf9004 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 9 Aug 2014 19:14:10 +0000 Subject: [PATCH 2/5] issue 734 additional fix --- app.sh | 2 +- etc/nginx/sites-available/default | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app.sh b/app.sh index 080f7e405..52651504a 100755 --- a/app.sh +++ b/app.sh @@ -57,7 +57,7 @@ do if [[ "$OSTYPE" == "darwin"* ]]; then uwsgi -s 127.0.0.1:1088 -p 8 -M --vhost --enable-threads --logto $DATADIR/apps.log & else - uwsgi -s 127.0.0.1:1088 -p 2 -M --vhost --enable-threads --plugin $PYTHONBIN --logto $DATADIR/apps.log & + uwsgi -s 127.0.0.1:1088 -p 8 -M --vhost --enable-threads --plugin $PYTHONBIN --logto $DATADIR/apps.log & fi SERVER_PID=$! fi diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default index d52a196c2..d376d1ad5 100755 --- a/etc/nginx/sites-available/default +++ b/etc/nginx/sites-available/default @@ -26,7 +26,7 @@ server { add_header Expires "0"; ## Set this to reflect the location of the www directory within the omniwallet repo. - root /home/ubuntu/omniwallet/www/; + root /home/myUser/omniwallet/www/; index index.htm index.html; #Re-route nested routed through index From 6bf9e65819be9063e0cd7502c66f3e4d5ae6400d Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Mon, 11 Aug 2014 16:40:34 +0000 Subject: [PATCH 3/5] issue 734 permission fix --- api/get_balance.py | 0 etc/nginx/sites-available/default | 0 www/partials/wallet_send_modal.html | 7 +++++-- 3 files changed, 5 insertions(+), 2 deletions(-) mode change 100755 => 100644 api/get_balance.py mode change 100755 => 100644 etc/nginx/sites-available/default diff --git a/api/get_balance.py b/api/get_balance.py old mode 100755 new mode 100644 diff --git a/etc/nginx/sites-available/default b/etc/nginx/sites-available/default old mode 100755 new mode 100644 diff --git a/www/partials/wallet_send_modal.html b/www/partials/wallet_send_modal.html index 1c47a3bac..fd603372e 100644 --- a/www/partials/wallet_send_modal.html +++ b/www/partials/wallet_send_modal.html @@ -6,7 +6,9 @@

You're about to send {{convertSatoshiToDisplayedValue(sendAmount)}} {{getDis If you encounter an error, feel free to click away from the dialog and try again.