forked from 0x2620/pandora
load Ox.js only once
This commit is contained in:
parent
19a56af125
commit
25b87a10b0
2 changed files with 3 additions and 9 deletions
|
@ -4,7 +4,6 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>{{title}}</title>
|
<title>{{title}}</title>
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/png/icon.png"/>
|
<link rel="shortcut icon" type="image/png" href="/static/png/icon.png"/>
|
||||||
<link rel="icon" href="/static/png/icon.png" sizes="32x32"/>
|
|
||||||
<link rel="icon" href="/static/png/icon.png" sizes="48x48"/>
|
<link rel="icon" href="/static/png/icon.png" sizes="48x48"/>
|
||||||
<meta name="application-name" content="{{settings.SITENAME}}"/>
|
<meta name="application-name" content="{{settings.SITENAME}}"/>
|
||||||
<meta name="application-url" content="{{base_url}}"/>
|
<meta name="application-url" content="{{base_url}}"/>
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
if (localStorage && !localStorage['Ox.theme'])
|
if (localStorage && !localStorage['Ox.theme'])
|
||||||
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
|
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="/static/oxjs/build/Ox.js"></script>
|
|
||||||
<script type="text/javascript" src="/static/js/pandora.js"></script>
|
<script type="text/javascript" src="/static/js/pandora.js"></script>
|
||||||
<meta name="title" content="{{title}}" />
|
<meta name="title" content="{{title}}" />
|
||||||
<meta name="description" content="{{settings.CONFIG.site.description|safe}}"/>
|
<meta name="description" content="{{settings.CONFIG.site.description|safe}}"/>
|
||||||
|
|
|
@ -38,13 +38,9 @@ appPanel
|
||||||
|
|
||||||
loadImages(function(images) {
|
loadImages(function(images) {
|
||||||
loadScreen(images);
|
loadScreen(images);
|
||||||
if (debug) {
|
|
||||||
loadOxJS(function() {
|
loadOxJS(function() {
|
||||||
loadOxUI(loadPandora);
|
loadOxUI(loadPandora);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
loadOxUI(loadPandora);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function loadImages(callback) {
|
function loadImages(callback) {
|
||||||
|
@ -155,7 +151,7 @@ appPanel
|
||||||
} else {
|
} else {
|
||||||
script.onload = callback;
|
script.onload = callback;
|
||||||
}
|
}
|
||||||
script.src = '/static/oxjs/dev/Ox.js';
|
script.src = '/static/oxjs/' + (debug ? 'dev' : 'build') + '/Ox.js';
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
head.appendChild(script);
|
head.appendChild(script);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue