add restore default buttons

This commit is contained in:
Matias Alejo Garcia 2014-11-12 21:31:07 -03:00
commit 5113e8b292
2 changed files with 25 additions and 5 deletions

View file

@ -1,13 +1,10 @@
'use strict';
angular.module('copayApp.controllers').controller('SettingsController', function($scope, $rootScope, $window, $location, controllerUtils, notification) {
angular.module('copayApp.controllers').controller('SettingsController', function($scope, $rootScope, $window, $route, $location, $anchorScroll, controllerUtils, notification) {
controllerUtils.redirIfLogged();
$scope.title = 'Settings';
$scope.defaultLanguage = config.defaultLanguage || 'en';
$scope.insightLivenet = config.network.livenet.url;
@ -102,4 +99,13 @@ angular.module('copayApp.controllers').controller('SettingsController', function
var hashIndex = window.location.href.indexOf('#!/');
window.location = window.location.href.substr(0, hashIndex);
};
$scope.reset = function() {
localStorage.removeItem('config');
$location.hash('top');
$anchorScroll();
$scope.message= 'Settings were reset to defaults';
};
});