This repository has been archived by the owner on Feb 21, 2020. It is now read-only.
forked from edulix/agora-core-view
-
Notifications
You must be signed in to change notification settings - Fork 4
/
avConfig.js
128 lines (102 loc) · 2.67 KB
/
avConfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/*
* ConfigService is a function that returns the configuration that exists
* in this same file, which you might want to edit and tune if needed.
*/
var avConfigData = {
// the base url path for ajax requests, for example for sending ballots or
// getting info about an election. This url is usually in the form of
// 'https://foo/api/v3/' and always ends in '/'.
theme: "default",
baseUrl: "http://agora.dev/elections/api/",
freeAuthId: 1,
// AuthApi base url
authAPI: "http://agora.dev/authapi/api/",
dnieUrl: "http://agora.dev/authapi/api/authmethod/dnie/auth/",
// Agora Elections base url
electionsAPI: "http://agora.dev/elections/api/",
authorities: [ "local-auth2" ],
director: "local-auth1",
// i18next language options, see http://i18next.com/pages/doc_init.html for
// details
i18nextInitOptions: {
// Default language of the application.
//
// Default: 'en'
//
// language: "en",
// Forces a specific language.
//
// Default: not set
//
// lng: "en",
// specifies the set language query string.
//
// Default: "lang"
//
// detectLngQS: 'lang',
// Specifies what translations will be available.
//
// Default: ['en', 'es', 'gl', 'ca']
//
// lngWhitelist: ['en', 'es', 'gl', 'ca'],
},
// specifies the language cookie options,
// see https://github.com/ivpusic/angular-cookie#options
i18nextCookieOptions: {
// Expiration in days
//
// Default: 360
//
// expires: 360,
// Cookie domain
//
// Default: not set
//
// domain: 'foobar',
},
// configure $locationProvider.html5Mode
// see https://code.angularjs.org/1.2.28/docs/guide/$location
//
// Default: false
// locationHtml5mode: false,
locationHtml5mode: true,
// If no Route is set, this is the route that will be loaded
//
// Default: '/admin/login'
defaultRoute: '/admin/login',
timeoutSeconds: 3600,
publicURL: "http://agora.dev/elections/public/",
// if we are in debug mode or not
debug: true,
// contact data where users can reach to a human when they need it
contact: {
email: "[email protected]",
twitter: "twitter",
tlf: "-no tlf-"
},
verifier: {
link: "",
hash: ""
},
help: {
info:""
},
success: {
text: ""
},
tos: {
text:"",
tile: ""
}
};
angular.module('avConfig', [])
.factory('ConfigService', function() {
return avConfigData;
});
angular.module('avConfig')
.provider('ConfigService', function ConfigServiceProvider() {
_.extend(this, avConfigData);
this.$get = [function ConfigServiceProviderFactory() {
return new ConfigServiceProvider();
}];
});