Merge pull request #6108 from gabrielbazan7/ref/addressbook
remove slide to delete and adding that option to addr entry view
This commit is contained in:
commit
a4495f73fc
4 changed files with 16 additions and 17 deletions
|
|
@ -46,19 +46,6 @@ angular.module('copayApp.controllers').controller('addressbookListController', f
|
||||||
$scope.addressbook = result;
|
$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.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
$scope.isChromeApp = platformInfo.isChromeApp;
|
$scope.isChromeApp = platformInfo.isChromeApp;
|
||||||
$scope.showAddIcon = false;
|
$scope.showAddIcon = false;
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,14 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f
|
||||||
}, 100);
|
}, 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>
|
<h2>{{addrEntry.name}}</h2>
|
||||||
<p>{{addrEntry.address}}</p>
|
<p>{{addrEntry.address}}</p>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<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-item>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,11 @@
|
||||||
<ion-nav-title>
|
<ion-nav-title>
|
||||||
<span>{{addressbookEntry.name}}</span>
|
<span>{{addressbookEntry.name}}</span>
|
||||||
</ion-nav-title>
|
</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-nav-bar>
|
||||||
<ion-content scroll="false">
|
<ion-content scroll="false">
|
||||||
<div class="gravatar-content">
|
<div class="gravatar-content">
|
||||||
|
|
@ -23,7 +28,7 @@
|
||||||
<span>{{addressbookEntry.email}}</span>
|
<span>{{addressbookEntry.email}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="item item-text-wrap">
|
<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>
|
<span>{{addressbookEntry.address}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue