Feat: support ISO_4217 currency codes when searching
This commit is contained in:
parent
09eaaa1536
commit
2b34344c95
3 changed files with 16 additions and 7 deletions
|
|
@ -43,8 +43,9 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
|
|||
$scope.findCurrency = function(search) {
|
||||
if (!search) init();
|
||||
$scope.altCurrencyList = lodash.filter(completeAlternativeList, function(item) {
|
||||
var val = item.name;
|
||||
return lodash.includes(val.toLowerCase(), search.toLowerCase());
|
||||
var val = item.name
|
||||
var val2 = item.isoCode;
|
||||
return lodash.includes(val.toLowerCase(), search.toLowerCase()) || lodash.includes(val2.toLowerCase(), search.toLowerCase());
|
||||
});
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
|
|
|
|||
|
|
@ -137,6 +137,14 @@
|
|||
.log-level {
|
||||
font-weight: bold;
|
||||
}
|
||||
.alt-currency-radio {
|
||||
.item-content {
|
||||
padding-right: 16px;
|
||||
}
|
||||
.radio-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#tab-settings {
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
</label>
|
||||
</div>
|
||||
<div class="list" ng-if="lastUsedAltCurrencyList[0]">
|
||||
<ion-radio ng-repeat="lastUsedAltCurrency in lastUsedAltCurrencyList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
|
||||
ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name}}
|
||||
<ion-radio class="alt-currency-radio" ng-repeat="lastUsedAltCurrency in lastUsedAltCurrencyList" ng-value="lastUsedAltCurrency.isoCode" ng-model="currentCurrency"
|
||||
ng-click="save(lastUsedAltCurrency)">{{lastUsedAltCurrency.name}} <span class="item-note">{{lastUsedAltCurrency.isoCode}}</span>
|
||||
</ion-radio>
|
||||
</div>
|
||||
<div class="list">
|
||||
<ion-radio ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
|
||||
ng-click="save(altCurrency)">{{altCurrency.name}}
|
||||
</ion-radio>
|
||||
<div class="item" ng-repeat="altCurrency in altCurrencyList" ng-value="altCurrency.isoCode" ng-model="currentCurrency"
|
||||
ng-click="save(altCurrency)">{{altCurrency.name}} <span class="item-note">{{altCurrency.isoCode}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<ion-infinite-scroll
|
||||
ng-if="!listComplete"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue