From 93d2a77f3db4de6abe1840eb12097eb7de4bb8ad Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 27 Sep 2010 10:15:25 +0200 Subject: [PATCH] update local.api --- pandora/static/js/pandora.local.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora/static/js/pandora.local.js b/pandora/static/js/pandora.local.js index 47050b8..c5739c0 100644 --- a/pandora/static/js/pandora.local.js +++ b/pandora/static/js/pandora.local.js @@ -9,6 +9,9 @@ app.afterLaunch.push(function() { api: new OxFF(), volumes: function(cb) { var _this = this; + Ox.print('api.volumes'); + this.api.login(window, app.user.username); + Ox.print('api.now access'); this.api.access(function(access) { Ox.print('access callback', access); if(!access) { @@ -33,7 +36,6 @@ app.afterLaunch.push(function() { .append("For this part of the page to work, you have to allow OxFF to send data to this site") .open(); } else { - _this.api.login(app.user.username); _this.api.volumes(function(result) { var data = JSON.parse(result); cb(data); @@ -42,9 +44,9 @@ app.afterLaunch.push(function() { }); }, files: function(archive, cb) { + this.api.login(window, app.user.username); if(!this.api.access()) return false; - this.api.login(app.user.username); this.api.files(archive, function(result) { var data = JSON.parse(result); cb(data);