Skip to content

Commit

Permalink
Fix link to readme/introduction
Browse files Browse the repository at this point in the history
SamyPesse committed Apr 13, 2014
1 parent dc36b1c commit 6fb44e1
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/templates/summary.html
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@
<hr>
<div class="inner">
<ul class="articles">
<li class="article open-readme" data-article="README.md"><span class="chapter-title">Introduction</span>
<li class="article open-readme active" data-article="README.md"><span class="chapter-title">Introduction</span>
</ul>
</div>
11 changes: 11 additions & 0 deletions src/views/summary.js
Original file line number Diff line number Diff line change
@@ -29,6 +29,9 @@ define([
var Summary = hr.View.extend({
className: "summary",
template: templateFile,
events: {
"click .open-readme": "openReadme"
},

initialize: function() {
Summary.__super__.initialize.apply(this, arguments);
@@ -81,6 +84,14 @@ define([
.then(function() {
return that.load();
});
},

/*
* Open README.md introduction
*/
openReadme: function(e) {
if (e) e.preventDefault();
this.parent.openReadme();
}
});

0 comments on commit 6fb44e1

Please sign in to comment.