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')