From f666bc23125504da3a56130720f4825134024455 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 26 Apr 2011 22:57:52 +0200 Subject: [PATCH] make /api work with new Ox api --- pandora/templates/api.html | 7 ++----- static/js/pandora.api.js | 15 ++++++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pandora/templates/api.html b/pandora/templates/api.html index a4247a8c..ec8436a0 100644 --- a/pandora/templates/api.html +++ b/pandora/templates/api.html @@ -5,15 +5,12 @@ - - + - - - + diff --git a/static/js/pandora.api.js b/static/js/pandora.api.js index 5a7593e1..9cb34291 100755 --- a/static/js/pandora.api.js +++ b/static/js/pandora.api.js @@ -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 = '

Overview

use this api in the browser with Ox.app or use pandora_client to use it in python
'; 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() { } }); } +}); +