commit
3ea67582b1
6 changed files with 196 additions and 83 deletions
|
|
@ -12,10 +12,6 @@
|
|||
|
||||
/* Conflicting styles that are customized as a compromise. These styles are a merge or compromise of foundation.css and ionic.css. */
|
||||
|
||||
.row {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.behind {
|
||||
z-index: -1;
|
||||
}
|
||||
|
|
@ -92,30 +88,6 @@
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
.button.button-light:hover {
|
||||
background-color: #fff;
|
||||
border: 1px solid #E9E9EC;
|
||||
}
|
||||
|
||||
.button.button-light:active {
|
||||
background-color: #ababab;
|
||||
border: 1px solid #E9E9EC;
|
||||
}
|
||||
|
||||
.button.button-stable:hover {
|
||||
background-color: transparent;
|
||||
border: 1px solid #E9E9EC;
|
||||
}
|
||||
|
||||
.button.button-stable:active {
|
||||
background-color: #ababab;
|
||||
border: 1px solid #E9E9EC;
|
||||
}
|
||||
|
||||
.button-amount {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button, .button {
|
||||
min-width: inherit;
|
||||
min-height: inherit;
|
||||
|
|
|
|||
|
|
@ -160,8 +160,9 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
|
|||
$ionicScrollDelegate.resize();
|
||||
}, 100);
|
||||
} else {
|
||||
self.setAmount(amount, $scope.showAlternativeAmount);
|
||||
$scope.cancel();
|
||||
$scope.sending = true;
|
||||
$scope.sendingAmount = profileService.formatAmount(amount * unitToSatoshi, true);
|
||||
$scope.sendingAlternativeAmount = $filter('formatFiatAmount')(alternativeAmount);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
69
src/js/controllers/tab-send.js
Normal file
69
src/js/controllers/tab-send.js
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabSendController', function($scope, $ionicModal, $log, addressbookService, profileService, configService, lodash) {
|
||||
var completeList;
|
||||
|
||||
$scope.init = function() {
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
|
||||
// $scope.contactList = lodash.isEmpty(ab) ? null : ab;
|
||||
$scope.contactList = [{
|
||||
label: 'Javier',
|
||||
address: '123456'
|
||||
}, {
|
||||
label: 'Javier 2',
|
||||
address: '654321'
|
||||
}, {
|
||||
label: 'Javier 3',
|
||||
address: '7891011'
|
||||
}, {
|
||||
label: 'Javier 4',
|
||||
address: '1101987'
|
||||
}];
|
||||
});
|
||||
|
||||
var config = configService.getSync();
|
||||
config.colorFor = config.colorFor || {};
|
||||
config.aliasFor = config.aliasFor || {};
|
||||
|
||||
var credentials = lodash.filter(profileService.profile.credentials, 'walletName');
|
||||
var ret = lodash.map(credentials, function(c) {
|
||||
return {
|
||||
m: c.m,
|
||||
n: c.n,
|
||||
name: config.aliasFor[c.walletId] || c.walletName,
|
||||
id: c.walletId,
|
||||
color: config.colorFor[c.walletId] || '#4A90E2',
|
||||
};
|
||||
});
|
||||
|
||||
$scope.wallets = lodash.sortBy(ret, 'name');
|
||||
$scope.list = completeList = $scope.contactList.concat($scope.wallets);
|
||||
};
|
||||
|
||||
$scope.findContact = function() {
|
||||
var result = lodash.filter($scope.list, function(item) {
|
||||
var val = item.label || item.alias || item.name;
|
||||
return lodash.includes(val.toLowerCase(), $scope.search.toLowerCase());
|
||||
});
|
||||
|
||||
if (lodash.isEmpty(result) || lodash.isEmpty($scope.search)) {
|
||||
$scope.list = completeList;
|
||||
return;
|
||||
}
|
||||
$scope.list = result;
|
||||
};
|
||||
|
||||
$scope.openInputAmountModal = function(recipient) {
|
||||
$scope.recipientName = recipient.name || recipient.label;
|
||||
$scope.recipientColor = recipient.color;
|
||||
|
||||
$ionicModal.fromTemplateUrl('views/modals/inputAmount.html', {
|
||||
scope: $scope
|
||||
}).then(function(modal) {
|
||||
$scope.inputAmountModal = modal;
|
||||
$scope.inputAmountModal.show();
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
@ -1981,6 +1981,10 @@ to prevent collapsing during animation*/
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
.transform-none {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/*** modals ***/
|
||||
|
||||
.hideModal {
|
||||
|
|
@ -2189,16 +2193,16 @@ input[type="number"] {
|
|||
|
||||
@media all and (max-height: 480px) {
|
||||
.calculator .button-calc .columns { padding: 10px; }
|
||||
.calculator .header-calc { top: 11%; }
|
||||
.calculator .header-calc { top: 30%; }
|
||||
}
|
||||
|
||||
@media (min-height: 481px) and (max-height: 670px) {
|
||||
.calculator .button-calc .columns { padding: 15px; }
|
||||
.calculator .header-calc { top: 15%; }
|
||||
.calculator .header-calc { top: 30%; }
|
||||
}
|
||||
|
||||
@media all and (min-height: 671px) {
|
||||
.calculator .button-calc .columns { padding: 20px; }
|
||||
.calculator .header-calc { top: 18%; }
|
||||
.calculator .header-calc { top: 32%; }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue