use Ox.load()
This commit is contained in:
parent
6be17d935d
commit
772774e330
2 changed files with 80 additions and 71 deletions
|
@ -10,10 +10,10 @@ if(typeof(console)=='undefined') {
|
|||
console.log = function() {};
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="/static/oxjs/build/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="/static/oxjs/build/js/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/jquery.tmpl.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
|
||||
<script type="text/javascript" src="/static/oxjs/build/js/OxUI.js"></script>
|
||||
<script type="text/javascript" src="/static/oxjs/build/js/Ox.js"></script>
|
||||
<script type="text/javascript" src="/static/js/pandora.js"></script>
|
||||
<!--
|
||||
<script type="text/javascript" src="/static/js/pandora.local.js"></script> -->
|
||||
|
|
|
@ -6,12 +6,19 @@
|
|||
// fixme: sort=-director doesn't work
|
||||
// fixme: don't reload full right panel on sortSelect
|
||||
// fixme: clear items cache after login/logout
|
||||
// fixme: rename config to site (site/user is better than config/user)
|
||||
|
||||
Ox.UI(function() {
|
||||
Ox.load('UI', {
|
||||
hideScreen: false,
|
||||
showScreen: true,
|
||||
theme: 'modern'
|
||||
}, function() {
|
||||
|
||||
window.pandora = new Ox.App({url: '/api/'}).launch(function(data) {
|
||||
window.pandora = new Ox.App({url: '/api/'}).bindEvent({
|
||||
|
||||
Ox.print('Ox.App launch', data);
|
||||
load: function(event, data) {
|
||||
|
||||
Ox.print('Ox.App load', data);
|
||||
|
||||
$.extend(app, {
|
||||
$ui: {
|
||||
|
@ -69,7 +76,7 @@ Ox.UI(function() {
|
|||
URL.update();
|
||||
};
|
||||
|
||||
Ox.theme(app.user.ui.theme);
|
||||
Ox.Theme(app.user.ui.theme);
|
||||
app.$ui.appPanel = ui.appPanel().display();
|
||||
|
||||
Ox.Request.requests() && app.$ui.loadingIcon.start();
|
||||
|
@ -80,6 +87,8 @@ Ox.UI(function() {
|
|||
|
||||
window.pandora.app = app;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var app = {
|
||||
|
@ -3430,13 +3439,13 @@ Ox.UI(function() {
|
|||
|
||||
function login(data) {
|
||||
app.user = data.user;
|
||||
Ox.theme(app.user.ui.theme);
|
||||
Ox.Theme(app.user.ui.theme);
|
||||
app.$ui.appPanel.reload();
|
||||
}
|
||||
|
||||
function logout(data) {
|
||||
app.user = data.user;
|
||||
Ox.theme(app.config.user.ui.theme);
|
||||
Ox.Theme(app.config.user.ui.theme);
|
||||
app.$ui.appPanel.reload();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue