From f5520ede2a87e9611010a1188aa7423bb83f5061 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 18 Dec 2014 15:31:19 +0000 Subject: [PATCH] update api docs parser --- static/js/apiDialog.js | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/static/js/apiDialog.js b/static/js/apiDialog.js index d35656c97..d357f0674 100644 --- a/static/js/apiDialog.js +++ b/static/js/apiDialog.js @@ -235,23 +235,24 @@ pandora.ui.apiDialog = function() { var code = actions[id].code[1], source = actions[id].code[0], line = Math.round(Ox.last(source.split(':')) || 0), - $title = $('

') - .css({paddingLeft: '4px'}) - .html('' + id + '') - .appendTo($text), - $doc = getDoc(actions[id].doc).appendTo($text), - $source = $('
') - .css({paddingLeft: '4px'}) - .html('
source: ' + source + '') - .appendTo($text), - $code = Ox.SyntaxHighlighter({ - source: code.replace(/\s*?'''[\s\S]+?'''/g, ''), - }) - .css({ - backgroundColor: 'rgba(0, 0, 0, 0)', - borderWidth: '1px', - }) - .appendTo($text); + $code; + $('

') + .css({paddingLeft: '4px'}) + .html('' + id + '') + .appendTo($text), + getDoc(actions[id].doc).appendTo($text), + $('
') + .css({paddingLeft: '4px'}) + .html('
source: ' + source + '') + .appendTo($text), + $code = Ox.SyntaxHighlighter({ + source: code.replace(/\s*?'''[\s\S]+?'''/g, ''), + }) + .css({ + backgroundColor: 'rgba(0, 0, 0, 0)', + borderWidth: '1px', + }) + .appendTo($text); // fix decorators $code.find('.OxError') .removeClass('OxError')