Merge pull request #2279 from cmgustavo/ux/minor-fixes

Fix receive layout. Re-factory of the confirmation popup
This commit is contained in:
Matias Alejo Garcia 2015-01-06 19:37:07 -03:00
commit be439f646f
5 changed files with 53 additions and 37 deletions

View File

@ -536,6 +536,7 @@ a.button-setup {
.m10b {margin-bottom: 10px;}
.m15b {margin-bottom: 15px;}
.m20b {margin-bottom: 20px;}
.m30b {margin-bottom: 30px;}
.m10r {margin-right: 10px;}
.m15l {margin-left: 15px;}
.m15t {margin-top: 15px;}

View File

@ -256,23 +256,6 @@ angular.module('copayApp.directives')
}
};
})
// From https://gist.github.com/asafge/7430497
.directive('ngReallyClick', [
function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
if (message && confirm(message)) {
scope.$apply(attrs.ngReallyClick);
}
});
}
}
}
])
.directive('showFocus', function($timeout) {
return function(scope, element, attrs) {
scope.$watch(attrs.showFocus,

View File

@ -1,4 +1,5 @@
<div class="text-center" ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()">
<div class="text-center" ng-init="isComplete = item.isComplete(); networkName = item.getNetworkName()">
<div ng-show="!confirmDelete">
<h1>{{item.name || item.id }}</h1>
<h3>
{{item.requiredCopayers}} of {{item.totalCopayers}} - {{networkName}}
@ -29,16 +30,9 @@
ng-show="isSafari || isCordova"><i class="fi-eye"></i> View Backup</button>
</div>
<div class="large-6 medium-6 small-12 columns">
<button class="warning expand" ng-disabled="loading"
ng-really-message="{{'Are you sure you want to delete the wallet'}} {{(item.name || item.id)}}"
ng-really-click="deleteWallet()">
<span ng-show="!loading">
<button class="warning expand" ng-click="confirmDelete=!confirmDelete">
<i class="fi-trash"></i> Delete
</span>
<span ng-show="loading">
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
</span>
</button>
</button>
</div>
</div>
@ -54,4 +48,24 @@
</div>
</div>
<a class="close-reveal-modal" ng-click="close()"><i class="fi-x size-18"></i></a>
</div>
<div class="row" ng-show="confirmDelete">
<h1>Are you sure you want to delete the wallet
<strong>{{(item.name || item.id)}}</strong>
</h1>
<div class="large-6 medium-6 small-6 columns">
<button class="gray" ng-disabled="loading"
ng-click="confirmDelete=!confirmDelete">Cancel</button>
</div>
<div class="large-6 medium-6 small-6 columns">
<button class="warning" ng-disabled="loading" ng-click="deleteWallet()">
<span ng-show="!loading">
<i class="fi-trash"></i> Delete
</span>
<span ng-show="loading">
<i class="fi-bitcoin-circle icon-rotate spinner"></i> Deleting...
</span>
</button>
</div>
</div>
</div>

View File

@ -128,9 +128,21 @@
<span translate>Delete Profile</span>
</h2>
<p translate class="text-gray">Permanently delete this profile and all its wallets. WARNING: this action cannot be reversed.</p>
<a translate class="button warning m0" ng-really-message="{{'Are you sure you want to delete this profile?' | translate}}"
ng-really-click="deleteProfile()">Delete Profile
</a>
<div ng-show="!confirmDelete">
<a translate class="button warning m0" ng-click="confirmDelete=!confirmDelete">Delete Profile
</a>
</div>
<div class="text-center" ng-show="confirmDelete">
<h2>Are you sure you want to delete this profile?</h2>
<div class="row">
<div class="large-6 medium-6 small-6 columns">
<a translate class="button gray m0" ng-click="confirmDelete=!confirmDelete">Cancel</a>
</div>
<div class="large-6 medium-6 small-6 columns">
<a translate class="button warning m0" ng-click="deleteProfile()">Delete</a>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -50,13 +50,19 @@
</div>
</div>
<div class="large-12 columns">
<a class="button secondary tiny text-center right" ng-click="newAddr()" ng-disabled="loading">
Generate new address
</a>
<a class="button secondary tiny text-center" ng-click="toggleShowAll()" ng-disabled="loading">
<span ng-show="!showAll" translate>Show all my addresses</span>
<span ng-show="showAll" translate>Hide them</span>
</a>
<div class="row">
<div class="large-6 medium-6 small-6 columns">
<a class="button secondary tiny text-center right" ng-click="newAddr()" ng-disabled="loading">
Generate new address
</a>
</div>
<div class="large-6 medium-6 small-6 columns">
<a class="button secondary tiny text-center" ng-click="toggleShowAll()" ng-disabled="loading">
<span ng-show="!showAll" translate>Show all my addresses</span>
<span ng-show="showAll" translate>Hide them</span>
</a>
</div>
</div>
</div>
</div>
</div>