mirror of https://github.com/BTCPrivate/copay.git
remove slide to delete and adding that option to addr entry view
This commit is contained in:
parent
acbfb87f45
commit
828b174c23
|
@ -46,19 +46,6 @@ angular.module('copayApp.controllers').controller('addressbookListController', f
|
|||
$scope.addressbook = result;
|
||||
};
|
||||
|
||||
$scope.remove = function(addr) {
|
||||
$timeout(function() {
|
||||
addressbookService.remove(addr, function(err, ab) {
|
||||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
return;
|
||||
}
|
||||
initAddressbook();
|
||||
$scope.$digest();
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.isChromeApp = platformInfo.isChromeApp;
|
||||
$scope.showAddIcon = false;
|
||||
|
|
|
@ -19,4 +19,14 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
|
|||
}, 100);
|
||||
};
|
||||
|
||||
$scope.remove = function(addr) {
|
||||
addressbookService.remove(addr, function(err, ab) {
|
||||
if (err) {
|
||||
popupService.showAlert(gettextCatalog.getString('Error'), err);
|
||||
return;
|
||||
}
|
||||
$ionicHistory.goBack();
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
@ -42,9 +42,6 @@
|
|||
<h2>{{addrEntry.name}}</h2>
|
||||
<p>{{addrEntry.address}}</p>
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
<ion-option-button class="button-assertive" ng-click="remove(addrEntry.address)">
|
||||
<i class="icon ion-minus-circled"></i>
|
||||
</ion-option-button>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
<ion-nav-title>
|
||||
<span>{{addressbookEntry.name}}</span>
|
||||
</ion-nav-title>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button back-button" ng-click="remove(addressbookEntry.address)">
|
||||
Remove
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
<ion-content scroll="false">
|
||||
<div class="gravatar-content">
|
||||
|
@ -23,7 +28,7 @@
|
|||
<span>{{addressbookEntry.email}}</span>
|
||||
</div>
|
||||
<div class="item item-text-wrap">
|
||||
<span class="address-book-field-label" translate>Address</span>
|
||||
<span class="address-book-field-label" copy-to-clipboard="addressbookEntry.address" translate>Address</span>
|
||||
<span>{{addressbookEntry.address}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue