make /api work with new Ox api

This commit is contained in:
j 2011-04-26 22:57:52 +02:00
parent 9bdea0af42
commit f666bc2312
2 changed files with 12 additions and 10 deletions

View file

@ -5,15 +5,12 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="shortcut icon" type="image/png" href="/static/png/icon.16.png"/>
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/css/ox.ui.css"/>
<link rel="stylesheet" type="text/css" href="/static/css/highlight.css"/>
<script type="text/javascript" src="/static/oxjs/build/js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/jquery/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
<script type="text/javascript" src="/static/js/highlight.pack.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/ox.load.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/ox.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/ox.ui.js"></script>
<script type="text/javascript" src="/static/oxjs/build/js/Ox.js"></script>
<script type="text/javascript" src="/static/js/pandora.api.js"></script>
</head>
<body></body>

View file

@ -1,21 +1,24 @@
/***
Pandora API
***/
Ox.load('UI', {
hideScreen: false,
showScreen: true,
theme: 'classic'
}, function() {
var app = new Ox.App({
apiURL: '/api/',
init: 'init',
}).launch(function(data) {
}).bindEvent('load', function(event, data) {
app.config = data.config;
app.user = data.user;
if (app.user.group == 'guest') {
app.user = data.config.user;
$.browser.safari && Ox.theme('modern');
}
app.config.default_info = '<div class="OxSelectable"><h2>Overview</h2>use this api in the browser with Ox.app or use <a href="http://code.0x2620.org/pandora_client">pandora_client</a> to use it in python</div>';
app.$body = $('body');
app.$document = $(document);
app.$window = $(window);
//app.$body.html('');
Ox.UI.hideLoadingScreen();
app.$ui = {};
app.$ui.actionList = constructList();
@ -150,3 +153,5 @@ function constructList() {
}
});
}
});