From 3a2ae103b45ac268fdce8301b8278e1ab5111435 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 14 Jan 2011 16:25:05 +0530 Subject: [PATCH] update api interface --- static/js/pandora.api.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/pandora.api.js b/static/js/pandora.api.js index 3e72b325..fe4f97da 100755 --- a/static/js/pandora.api.js +++ b/static/js/pandora.api.js @@ -24,8 +24,8 @@ var app = new Ox.App({ app.$ui.actionList = constructList(); app.$ui.actionInfo = Ox.Container().css({padding: '8px'}); - app.api.apidoc(function(results) { - app.docs = results.data.actions; + app.api.api({docs: true}, function(results) { + app.actions = results.data.actions; if(document.location.hash) { app.$ui.actionList.triggerEvent('select', {ids: document.location.hash.substring(1).split(',')}); @@ -94,7 +94,7 @@ function constructList() { $.each(data.ids, function(v, k) { console.log(k) info.append($("
').html(app.docs[k].replace('/\n/
\n/g'))); + info.append($('').html(app.actions[k]['doc'].replace('/\n/
\n/g'))); hash += k + ',' }); document.location.hash = hash.substring(0, hash.length-1);