Skip to content

Commit

Permalink
Add scope docs to IDE documentation tab, update display of method par…
Browse files Browse the repository at this point in the history
…ameters
  • Loading branch information
LBDonovan committed Jul 9, 2016
1 parent 44a623d commit 751dc11
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 7 deletions.
8 changes: 4 additions & 4 deletions ide/IDE/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ <h1>Documentation</h1>
<ul id="utilityDocs" class="subsections">
</ul>
</li>
<!--<li>
<li>
<input type="checkbox" class="docs" id="tit3">
<label for="tit3" class="docSectionHeader">Working with Sensors</label>
<ul class="subsections">
<label for="tit3" class="docSectionHeader">The Scope</label>
<ul id="scopeDocs" class="subsections">
</ul>
</li>-->
</li>
</ul>
</div><!-- Xenomai -->
</div><!-- end Doc tab -->
Expand Down
35 changes: 34 additions & 1 deletion ide/IDE/public/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ide/IDE/public/js/bundle.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ide/IDE/public/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,9 @@ label.docSectionHeader {
font-size: 12px;
padding: 10px 0;
}
.subsections li, .subsections span{
cursor: auto;
}

.subsections div>h2 { /* title */

Expand All @@ -1127,6 +1130,9 @@ label.docSectionHeader {
.subsections div>p { /* content */

}
.subsections div li {
list-style: initial;
}


.sections input + label + ul
Expand Down
35 changes: 34 additions & 1 deletion ide/dev/src/Views/DocumentationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@ class DocumentationView extends View {
}
});

// Scope
$.ajax({
type: "GET",
url: "documentation_xml?file=classScope",
dataType: "xml",
success: function(xml){
//console.log(xml);
var counter = 0;
$(xml).find('[kind="public-func"]>memberdef:not(:has(name:contains(Scope)))').each(function(){
//console.log($(this));
var li = createlifrommemberdef($(this), 'scopeDocs'+counter);
li.appendTo($('#scopeDocs'));
counter += 1;
});
}
});

}

}
Expand All @@ -80,7 +97,23 @@ function createlifrommemberdef($xml, id){
content.append($('<h3></h3>').html( $xml.find('briefdescription > para').html() || '' ));

// main text
content.append($('<p></p>').html( $xml.find('detaileddescription > para').html() || '' ));
$xml.find('detaileddescription > para').each(function(){
if ($(this).find('parameterlist').length){
content.append('</br><h3>Parameters:</h3>');
var ul = $('<ul></ul>');
$(this).find('parameteritem').each(function(){
var li = $('<li></li>');
li.append($('<strong></strong>').html( $(this).find('parametername').html()+': ' ));
$(this).find('parameterdescription>para').each(function(){
li.append($('<span></span>').html( $(this).html() || '' ));
});
ul.append(li);
});
content.append(ul);
} else {
content.append($('<p></p>').html( $(this).html() || '' ));
}
});

li.append(content);
return li;
Expand Down

0 comments on commit 751dc11

Please sign in to comment.