load Ox.js only once

This commit is contained in:
j 2012-05-28 13:36:10 +02:00
parent 19a56af125
commit 25b87a10b0
2 changed files with 3 additions and 9 deletions

View file

@ -4,7 +4,6 @@
<meta charset="utf-8" />
<title>{{title}}</title>
<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"/>
<meta name="application-name" content="{{settings.SITENAME}}"/>
<meta name="application-url" content="{{base_url}}"/>
@ -14,7 +13,6 @@
if (localStorage && !localStorage['Ox.theme'])
localStorage['Ox.theme'] = '"{{settings.CONFIG.user.ui.theme}}"';
</script>
<script type="text/javascript" src="/static/oxjs/build/Ox.js"></script>
<script type="text/javascript" src="/static/js/pandora.js"></script>
<meta name="title" content="{{title}}" />
<meta name="description" content="{{settings.CONFIG.site.description|safe}}"/>

View file

@ -38,13 +38,9 @@ appPanel
loadImages(function(images) {
loadScreen(images);
if (debug) {
loadOxJS(function() {
loadOxUI(loadPandora);
});
} else {
loadOxUI(loadPandora);
}
});
function loadImages(callback) {
@ -155,7 +151,7 @@ appPanel
} else {
script.onload = callback;
}
script.src = '/static/oxjs/dev/Ox.js';
script.src = '/static/oxjs/' + (debug ? 'dev' : 'build') + '/Ox.js';
script.type = 'text/javascript';
head.appendChild(script);
}