From 1902e0126703e2ef5b87f800d7e713c3739f8405 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 3 Jan 2015 21:04:00 -0300 Subject: [PATCH] fix join / export\ --- Makefile | 6 +++--- index.html | 16 ++++++++-------- js/controllers/create.js | 11 +++++++++-- js/controllers/createProfile.js | 2 -- js/controllers/homeWallet.js | 4 +++- js/controllers/import.js | 8 ++++++++ js/controllers/join.js | 7 +++++++ js/controllers/send.js | 5 +---- views/create.html | 7 +------ views/createProfile.html | 1 + 10 files changed, 41 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index 007c875cd..a40c13121 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ release-android: cordova-base make -C cordova release-android wp8: - cordova/build.sh WP8 - cordova/wp/fix-svg.sh - echo -e "\a" + cordova/build.sh WP8 + cordova/wp/fix-svg.sh + echo -e "\a" diff --git a/index.html b/index.html index cfc7024d9..4352ba910 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -83,14 +83,14 @@ -
- -
+
+ +
-

- {{$root.wallet.getName()}} -

+

+ {{$root.wallet.getName()}} +

@@ -103,7 +103,7 @@ role='navigation' class="sidebar">
+ $root.wallet.isComplete() && !$root.wallet.isLocked && !$root.hideWalletNavigation">
diff --git a/js/controllers/create.js b/js/controllers/create.js index ce727428d..54d99263a 100644 --- a/js/controllers/create.js +++ b/js/controllers/create.js @@ -1,15 +1,17 @@ 'use strict'; angular.module('copayApp.controllers').controller('CreateController', - function($scope, $rootScope, $location, $timeout, identityService, backupService, notification, defaults) { + function($scope, $rootScope, $location, $timeout, identityService, backupService, notification, defaults, isMobile, isCordova) { $rootScope.fromSetup = true; $scope.loading = false; $scope.walletPassword = $rootScope.walletPassword; - $scope.isMobile = !!window.cordova; + $scope.isMobile = isMobile.any(); $scope.hideAdv = true; $scope.networkName = config.networkName; $rootScope.title = 'Create new wallet'; + $rootScope.hideWalletNavigation = true; + $scope.isWindowsPhoneApp = isMobile.Windows() && isCordova; // ng-repeat defined number of times instead of repeating over array? $scope.getNumber = function(num) { @@ -39,6 +41,7 @@ angular.module('copayApp.controllers').controller('CreateController', return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url; }; + $scope.create = function(form) { if (form && form.$invalid) { $scope.error = 'Please enter the required fields'; @@ -68,4 +71,8 @@ angular.module('copayApp.controllers').controller('CreateController', },1); }); }; + + $scope.$on("$destroy", function () { + $rootScope.hideWalletNavigation = false; + }); }); diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index 7bdf36a53..71061cac2 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -19,8 +19,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $scope.minPasswordStrength = _.isUndefined(config.minPasswordStrength) ? 4 : config.minPasswordStrength; - //TODO - $scope.minPasswordStrength = 1; pinService.makePinInput($scope, 'newpin', function(newValue) { _firstpin = newValue; diff --git a/js/controllers/homeWallet.js b/js/controllers/homeWallet.js index 8fa9cbceb..b631e983f 100644 --- a/js/controllers/homeWallet.js +++ b/js/controllers/homeWallet.js @@ -2,7 +2,9 @@ angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $modal, rateService, notification, txStatus, identityService) { $scope.initHome = function() { - $rootScope.title = 'Home'; + $rootScope.title = 'Home'; + $rootScope.hideWalletNavigation = false; + var w = $rootScope.wallet; $scope.isShared = w.isShared(); $scope.requiresMultipleSignatures = w.requiresMultipleSignatures(); diff --git a/js/controllers/import.js b/js/controllers/import.js index 780de8040..f317833ad 100644 --- a/js/controllers/import.js +++ b/js/controllers/import.js @@ -9,6 +9,8 @@ angular.module('copayApp.controllers').controller('ImportController', $scope.isSafari = isMobile.Safari(); $scope.isCordova = isCordova; $scope.importOpts = {}; + $rootScope.hideWalletNavigation = true; + window.ignoreMobilePause = true; $scope.$on('$destroy', function() { @@ -96,4 +98,10 @@ angular.module('copayApp.controllers').controller('ImportController', }); } }; + + + $scope.$on("$destroy", function () { + $rootScope.hideWalletNavigation = false; + }); + }); diff --git a/js/controllers/join.js b/js/controllers/join.js index 402c427e3..8d323ae8f 100644 --- a/js/controllers/join.js +++ b/js/controllers/join.js @@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('JoinController', $scope.loading = false; $scope.isMobile = isMobile.any(); $rootScope.title = 'Join shared wallet'; + $rootScope.hideWalletNavigation = true; + // QR code Scanner var cameraInput; @@ -150,4 +152,9 @@ angular.module('copayApp.controllers').controller('JoinController', $timeout(function () { $scope.$digest(); }, 1); }); } + + + $scope.$on("$destroy", function () { + $rootScope.hideWalletNavigation = false; + }); }); diff --git a/js/controllers/send.js b/js/controllers/send.js index 3f6e029be..bbf3d2324 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -15,9 +15,6 @@ angular.module('copayApp.controllers').controller('SendController', $scope.isMobile = isMobile.any(); $scope.isWindowsPhoneApp = isMobile.Windows() && isCordova; - - // TODO - $scope.isWindowsPhoneApp = 1; $rootScope.wpInputFocused = false; $scope.isShared = w.isShared(); @@ -73,7 +70,7 @@ angular.module('copayApp.controllers').controller('SendController', } $timeout(function() { $rootScope.$digest(); - }, 100); + }, 1); }; $scope.setInputs = function() { diff --git a/views/create.html b/views/create.html index debb364b3..c5b5b38d9 100644 --- a/views/create.html +++ b/views/create.html @@ -3,11 +3,6 @@
-
-
-

{{$root.title}}

-
-
@@ -24,7 +19,7 @@
diff --git a/views/createProfile.html b/views/createProfile.html index 7e704ef44..29badbf47 100644 --- a/views/createProfile.html +++ b/views/createProfile.html @@ -149,6 +149,7 @@
+