Skip to content
Snippets Groups Projects
Commit 92b98903 authored by CamilleC's avatar CamilleC
Browse files

Cleaning of currency-controllers

parent 5ddef2c0
No related branches found
No related tags found
1 merge request!257Add filters in node's list
......@@ -73,7 +73,8 @@ function CurrencyLookupController($scope, $state, UIUtils, csCurrency) {
};
}
function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils, csSettings, csCurrency, csNetwork) {
function CurrencyViewController($scope, $q, $translate, $timeout, $filter,
BMA, UIUtils, csSettings, csCurrency, csNetwork) {
$scope.formData = {
useRelative: csSettings.data.useRelative
};
......@@ -99,9 +100,6 @@ function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils,
$scope.xpercent = 0;
$scope.$on('$ionicView.enter', function(e, state) {
$translate('COMMON.DATE_PATTERN')
.then(function(datePattern) {
$scope.datePattern = datePattern;
if (state.stateParams && state.stateParams.name) { // Load by name
csCurrency.searchByName(state.stateParams.name)
.then(function(currency){
......@@ -118,11 +116,6 @@ function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils,
.catch(UIUtils.onError('ERROR.GET_CURRENCY_FAILED'));
}
});
});
$scope.$on('$ionicView.beforeLeave', function(){
csNetwork.close();
});
$scope.load = function(currency) {
$scope.name = currency.name;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment