coverpage: Make showing the table conditional.

This commit is contained in:
Chris Johns 2017-01-12 13:18:43 +11:00
parent bceb2860b7
commit 321d20a02d
2 changed files with 5 additions and 5 deletions

View File

@ -9,5 +9,5 @@
*/ */
function coverPageCatalogue() { function coverPageCatalogue() {
xml = '@CATALOGUE'; xml = '@CATALOGUE';
paintCatalogue($.parseXML(xml)); paintCatalogue($.parseXML(xml), true);
} }

View File

@ -50,7 +50,7 @@ function catalogueFooter() {
' </dev/>'; ' </dev/>';
} }
function paintCatalogue(xml) { function paintCatalogue(xml, show) {
var el_cat_title = $('#rtems-catalogue-title'); var el_cat_title = $('#rtems-catalogue-title');
var el_cat = $('#rtems-catalogue'); var el_cat = $('#rtems-catalogue');
/* /*
@ -62,7 +62,6 @@ function paintCatalogue(xml) {
var date = $(docs).attr('date'); var date = $(docs).attr('date');
var title = $(docs).find('catalogue'); var title = $(docs).find('catalogue');
var id = title.text().replace(/\.| |\(|\)|\[|\]/g, '_'); var id = title.text().replace(/\.| |\(|\)|\[|\]/g, '_');
console.log(id);
var table = catalogueHeader(id, title.text(), date); var table = catalogueHeader(id, title.text(), date);
$(docs).find('doc').each(function() { $(docs).find('doc').each(function() {
var name = $(this).find('name').text(); var name = $(this).find('name').text();
@ -99,10 +98,11 @@ function paintCatalogue(xml) {
$('#' + id + '1').on('hidden.bs.collapse', function () { $('#' + id + '1').on('hidden.bs.collapse', function () {
$("#" + id + " i.indicator").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); $("#" + id + " i.indicator").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
}); });
if (show == true)
$('#' + id + '1').collapse('show'); $('#' + id + '1').collapse('show');
} }
function loadCatalogue(path) { function loadCatalogue(path, show) {
var f = $.get(path, function(xml) { var f = $.get(path, function(xml) {
paintCatalogue(xml); paintCatalogue(xml);
}, 'xml'); }, 'xml');