new wallets directive

This commit is contained in:
Javier 2016-08-22 16:07:21 -03:00
commit d337e73d00
3 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,20 @@
<div class="wallets" ng-show="wallets[0]">
<ion-slides class="slides" slider="data.slider">
<ion-slide-page ng-repeat="wallet in wallets track by $index">
<div class="list card">
<ul class="pr">
<li ng-show="wallets[0]" class="item item-icon-left">
<i class="icon ion-briefcase size-21" ng-style="{'color':wallet.color}"></i>
{{wallet.name || wallet.id}}
<span class="item-note" ng-show="wallet.n > 1 && wallet.isComplete()">
{{wallet.m}}-of-{{wallet.n}}
</span>
<span class="badge badge-assertive" ng-show="!wallet.isComplete()" translate>
Incomplete
</span>
</li>
</ul>
</div>
</ion-slide-page>
</ion-slides>
</div>

View file

@ -142,4 +142,27 @@ angular.module('copayApp.directives')
});
}
}
})
.directive('wallets', function(profileService, lodash) {
return {
restrict: 'E',
templateUrl: 'views/includes/wallets.html',
scope: {},
link: function(scope, element, attrs) {
var opts = {};
opts.onlyComplete = attrs.onlyComplete == 'true' ? true : null;
opts.network = attrs.network;
opts.n = attrs.n;
scope.wallets = profileService.getWallets(opts);
scope.$on("$ionicSlides.sliderInitialized", function(event, data) {
scope.slider = data.slider;
});
scope.$on("$ionicSlides.slideChangeEnd", function(event, data) {
scope.index = data.slider.activeIndex;
});
}
}
});

View file

@ -877,6 +877,13 @@ input[type=file] {
width: inherit;
}
.wallets {
height: 105px;
}
.no-pager .swiper-pagination {
display: none;
}
/*
* Calculator
*/