[rtems-docs commit] coverpage: Make showing the table conditional.

Chris Johns chrisj at rtems.org
Thu Jan 12 02:18:48 UTC 2017


Module:    rtems-docs
Branch:    master
Commit:    321d20a02dfc799045ad49ddbd184c3a335f595d
Changeset: http://git.rtems.org/rtems-docs/commit/?id=321d20a02dfc799045ad49ddbd184c3a335f595d

Author:    Chris Johns <chrisj at rtems.org>
Date:      Thu Jan 12 13:18:43 2017 +1100

coverpage: Make showing the table conditional.

---

 common/coverpage/coverpage.js                 | 2 +-
 common/coverpage/static/rtems/js/catalogue.js | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/coverpage/coverpage.js b/common/coverpage/coverpage.js
index 4655c29..7a24c94 100644
--- a/common/coverpage/coverpage.js
+++ b/common/coverpage/coverpage.js
@@ -9,5 +9,5 @@
  */
 function coverPageCatalogue() {
     xml = '@CATALOGUE';
-    paintCatalogue($.parseXML(xml));
+    paintCatalogue($.parseXML(xml), true);
 }
diff --git a/common/coverpage/static/rtems/js/catalogue.js b/common/coverpage/static/rtems/js/catalogue.js
index c3becf6..9a6a221 100644
--- a/common/coverpage/static/rtems/js/catalogue.js
+++ b/common/coverpage/static/rtems/js/catalogue.js
@@ -50,7 +50,7 @@ function catalogueFooter() {
 	' </dev/>';
 }
 
-function paintCatalogue(xml) {
+function paintCatalogue(xml, show) {
     var el_cat_title = $('#rtems-catalogue-title');
     var el_cat = $('#rtems-catalogue');
     /*
@@ -62,7 +62,6 @@ function paintCatalogue(xml) {
     var date = $(docs).attr('date');
     var title = $(docs).find('catalogue');
     var id = title.text().replace(/\.| |\(|\)|\[|\]/g, '_');
-    console.log(id);
     var table = catalogueHeader(id, title.text(), date);
     $(docs).find('doc').each(function() {
 	var name = $(this).find('name').text();
@@ -99,10 +98,11 @@ function paintCatalogue(xml) {
     $('#' + id + '1').on('hidden.bs.collapse', function () {
 	$("#" + id + " i.indicator").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
     });
-    $('#' + id + '1').collapse('show');
+    if (show == true)
+	$('#' + id + '1').collapse('show');
 }
 
-function loadCatalogue(path) {
+function loadCatalogue(path, show) {
     var f = $.get(path, function(xml) {
 	paintCatalogue(xml);
     }, 'xml');



More information about the vc mailing list