Improved bitpay account pairing and management of paired state and data.
This commit is contained in:
parent
15d12823ab
commit
63bc3d8f63
23 changed files with 691 additions and 208 deletions
28
src/js/directives/accountSelector.js
Normal file
28
src/js/directives/accountSelector.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.directives')
|
||||
.directive('accountSelector', function($timeout) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'views/includes/accountSelector.html',
|
||||
transclude: true,
|
||||
scope: {
|
||||
title: '=accountSelectorTitle',
|
||||
show: '=accountSelectorShow',
|
||||
accounts: '=accountSelectorAccounts',
|
||||
selectedAccount: '=accountSelectorSelectedAccount',
|
||||
onSelect: '=accountSelectorOnSelect'
|
||||
},
|
||||
link: function(scope, element, attrs) {
|
||||
scope.hide = function() {
|
||||
scope.show = false;
|
||||
};
|
||||
scope.selectAccount = function(account) {
|
||||
$timeout(function() {
|
||||
scope.hide();
|
||||
}, 100);
|
||||
scope.onSelect(account);
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue