Skip to content

Commit

Permalink
allow setting theme colors in config.js
Browse files Browse the repository at this point in the history
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
  • Loading branch information
championswimmer committed Aug 28, 2015
1 parent 816b16f commit e2e71e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
17 changes: 11 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ var openevent = angular.module('openevent',
'oe.map'
]);

openevent.config(['$urlRouterProvider', '$httpProvider', function($urlRouterProvider, $httpProvider) {
openevent.config(['$urlRouterProvider', '$httpProvider', '$mdThemingProvider',
function($urlRouterProvider, $httpProvider, $mdThemingProvider) {

//$httpProvider.defaults.useXDomain = true;
//delete $httpProvider.defaults.headers.common['X-Requested-With'];
$urlRouterProvider.otherwise('sessions');
}]);
//$httpProvider.defaults.useXDomain = true;
//delete $httpProvider.defaults.headers.common['X-Requested-With'];
$urlRouterProvider.otherwise('sessions');

$mdThemingProvider.theme('default')
.primaryPalette(config.themeColorPrimary)
.accentPalette(config.themeColorAccent);
}]);

openevent.controller('AppController',
[ '$mdSidenav', '$mdMedia', '$sessionStorage', 'ApiJsonFactory',
Expand Down Expand Up @@ -61,4 +66,4 @@ openevent.controller('AppController',
});
}

}]);
}]);
4 changes: 3 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ var config = {
"title": "OpenEvent",
"apiBaseGetUrl": "http://springboard.championswimmer.in/api/v1/",
"eventId": "1",
"use_testApi": true
"use_testApi": true,
"themeColorPrimary": "yellow",
"themeColorAccent": "teal"
};

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "open-event-webapp",
"version": "0.0.1",
"version": "0.0.2",
"repository": {
"url": "git://github.com/fossasia/open-event-webapp.git"
},
Expand Down

0 comments on commit e2e71e1

Please sign in to comment.