load config using requirejs
This commit is contained in:
parent
5d9555cfd5
commit
3b77d1230b
|
@ -1,4 +1,4 @@
|
||||||
{
|
define({
|
||||||
"dataPath": "https://map.luebeck.freifunk.net/data/",
|
"dataPath": "https://map.luebeck.freifunk.net/data/",
|
||||||
"showContact": true
|
"showContact": true
|
||||||
}
|
})
|
|
@ -1,11 +1,11 @@
|
||||||
require(["router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "nodelist", "simplenodelist", "infobox/main"],
|
require(["config", "router", "map", "sidebar", "tabs", "container", "meshstats", "linklist", "nodelist", "simplenodelist", "infobox/main"],
|
||||||
function (Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist, SimpleNodelist, Infobox) {
|
function (Config, Router, Map, Sidebar, Tabs, Container, Meshstats, Linklist, Nodelist, SimpleNodelist, Infobox) {
|
||||||
|
|
||||||
/* Required for Intl shim */
|
/* Required for Intl shim */
|
||||||
if ("__addLocaleData" in Intl)
|
if ("__addLocaleData" in Intl)
|
||||||
getJSON("vendor/de-DE.json").then(Intl.__addLocaleData)
|
getJSON("vendor/de-DE.json").then(Intl.__addLocaleData)
|
||||||
|
|
||||||
getJSON("config.json").then(main)
|
main(Config)
|
||||||
|
|
||||||
function main(config) {
|
function main(config) {
|
||||||
var linklist, lostnodeslist, map, meshstats, newnodeslist, nodelist, router
|
var linklist, lostnodeslist, map, meshstats, newnodeslist, nodelist, router
|
||||||
|
|
Loading…
Reference in a new issue