fix gravatar
This commit is contained in:
parent
68d3195f7f
commit
1b8f656579
3 changed files with 7 additions and 30 deletions
|
|
@ -2,33 +2,10 @@
|
|||
|
||||
angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, $stateParams, lodash, addressbookService, popupService, $ionicHistory) {
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data){
|
||||
var address = data.stateParams.address;
|
||||
|
||||
if (!address) {
|
||||
$ionicHistory.back();
|
||||
return;
|
||||
}
|
||||
|
||||
addressbookService.get(address, function(err, obj) {
|
||||
if (err) {
|
||||
popupService.showAlert(err);
|
||||
return;
|
||||
}
|
||||
if (!lodash.isObject(obj)) {
|
||||
var name = obj;
|
||||
obj = {
|
||||
'name': name,
|
||||
'address': address,
|
||||
'email': ''
|
||||
};
|
||||
}
|
||||
$scope.addressbookEntry = obj;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
});
|
||||
});
|
||||
$scope.addressbookEntry = {};
|
||||
$scope.addressbookEntry.name = $stateParams.name;
|
||||
$scope.addressbookEntry.email = $stateParams.email;
|
||||
$scope.addressbookEntry.address = $stateParams.address;
|
||||
|
||||
$scope.sendTo = function() {
|
||||
$ionicHistory.removeBackView();
|
||||
|
|
|
|||
|
|
@ -571,7 +571,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
.state('tabs.addressbook.view', {
|
||||
url: '/view/:address',
|
||||
url: '/view/:address/:email/:name',
|
||||
views: {
|
||||
'tab-settings@tabs': {
|
||||
templateUrl: 'views/addressbook.view.html',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
</ion-content>
|
||||
<ion-content class="ng-hide" ng-show="!isEmptyList">
|
||||
<div class="bar bar-header item-input-inset" ng-show="!isEmptyList">
|
||||
<div class="bar bar-header item-input-inset" ng-show="!isEmptyList && addressbook.length >= 5">
|
||||
<label class="item-input-wrapper">
|
||||
<i class="icon ion-ios-search placeholder-icon"></i>
|
||||
<input type="search"
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
<ion-list>
|
||||
<ion-item ng-repeat="addrEntry in addressbook"
|
||||
class="item-icon-right item-avatar"
|
||||
ui-sref="tabs.addressbook.view({address:addrEntry.address})">
|
||||
ui-sref="tabs.addressbook.view({address:addrEntry.address, email: addrEntry.email, name: addrEntry.name})">
|
||||
<gravatar name="{{addrEntry.name}}" width="50" email="{{addrEntry.email}}"></gravatar>
|
||||
<h2>{{addrEntry.name}}</h2>
|
||||
<p>{{addrEntry.address}}</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue