/*** Pandora API ***/ var app = new Ox.App({ apiURL: '/api/', init: 'init', }).launch(function(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 = '
') .html(app.actions[k].doc.replace('/\n/
\n/g')) .appendTo(info); var $code = $('') .html(app.actions[k].code[1].replace('/\n/
\n/g')) .hide(); var $button = new Ox.Button({ title: [ {id: "one", title: "expand"}, {id: "two", title: "collapse"}, ], type: "image" }) .addClass("margin") .click(function() { $code.toggle()}) .appendTo(info) var f = app.actions[k].code[0]; $('').html(' View Source ('+f+')').appendTo(info) $('').append($code).appendTo(info) hljs.highlightBlock($code[0], ' '); hash += k + ',' }); else info.html(app.config.default_info); document.location.hash = hash.substring(0, hash.length-1); app.$ui.actionInfo.html(info); } }); }