Merge pull request #2911 from tschaub/fires

List events fired in the navigation.
This commit is contained in:
Tim Schaub
2014-11-06 11:10:37 -07:00
3 changed files with 20 additions and 3 deletions

View File

@@ -57,8 +57,8 @@ $(function () {
var unstable = $('.unstable');
var stabilityToggle = $('#stability-toggle');
stabilityToggle.change(function() {
unstable.toggle(!this.checked);
unstable.toggleClass('hidden', this.checked);
return false;
});
unstable.toggle(!stabilityToggle[0].checked);
unstable.toggleClass('hidden', stabilityToggle[0].checked);
});

View File

@@ -372,7 +372,7 @@ footer {
.main .readme table ul li {
margin-bottom: 0;
}
.unstable {
.hidden {
display: none;
}
#stability {

View File

@@ -64,6 +64,23 @@ var self = this;
}
?>
</ul>
<ul class="fires itemMembers">
<?js
if (item.fires && item.fires.length) {
?>
<span class="subtitle">Fires</span>
<?js
item.fires.forEach(function (v) {
v = self.find({longname: v})[0] || {longname: v, name: v.split(/#?event:/)[1]};
?>
<li data-name="<?js= v.longname ?>" class="<?js= (v.stability != 'stable' ? 'unstable' : '') ?>">
<?js= self.linkto(v.longname, v.name) ?>
</li>
<?js
});
}
?>
</ul>
</li>
<?js }); ?>
</ul>