helpcenter/Web/js/help/server_commands.js

15 lines
728 B
JavaScript

var serverCommandList=[];
$(document).ready(function(){
$('pre').each(function(index) {
var serverCommandTitle = $(this).attr('data-title'), serverCommandClass = $(this).attr('class');
if(serverCommandTitle != undefined) {
serverCommandList.push(serverCommandTitle, $(this).text(), serverCommandClass);
}
});
if(serverCommandList.length != 0) {
$('.MainHelpCenter').append('<h2 id="allCommandsAtGlance">' + serverCommandsTranslation + '</h2><ol class="command_list">');
for (var i=0; i < serverCommandList.length; i += 3) {
$('ol.command_list').append('<li><h6>' + serverCommandList[i] + '</h6><pre class="' + serverCommandList[i+2] + '"><code>' + serverCommandList[i+1] + '</code></pre></li>');
}
}
});