CSS Style themes support in Copay

This commit is contained in:
Gustavo Cortez 2014-04-25 17:22:51 -03:00
commit 08e4eaf5e0
9 changed files with 246 additions and 137 deletions

View file

@ -5,6 +5,7 @@ var copayApp = window.copayApp = angular.module('copay',[
'mm.foundation',
'monospaced.qrcode',
'copay.header',
'copay.footer',
'copay.addresses',
'copay.transactions',
'copay.send',
@ -19,6 +20,7 @@ var copayApp = window.copayApp = angular.module('copay',[
]);
angular.module('copay.header', []);
angular.module('copay.footer', []);
angular.module('copay.addresses', []);
angular.module('copay.transactions', []);
angular.module('copay.send', []);

19
js/controllers/footer.js Normal file
View file

@ -0,0 +1,19 @@
'use strict';
angular.module('copay.footer').controller('FooterController',
function($scope) {
if (config.themes && Array.isArray(config.themes) && config.themes[0]) {
$scope.themes = config.themes;
}
else {
$scope.themes = ['default'];
}
$scope.theme = 'css/tpl-' + $scope.themes[0] + '.css';
$scope.change_theme = function(name) {
$scope.theme = 'css/tpl-' + name + '.css';
};
});