Commit dd087a1e by Tyler Hallada

Make the Section Highlights in outline a button

parent 5026b4f9
...@@ -220,9 +220,11 @@ define(['jquery', 'underscore', 'js/views/xblock_outline', 'common/js/components ...@@ -220,9 +220,11 @@ define(['jquery', 'underscore', 'js/views/xblock_outline', 'common/js/components
event.preventDefault(); event.preventDefault();
this.publishXBlock(); this.publishXBlock();
}.bind(this)); }.bind(this));
element.find('.highlights-button').click(function(event) { element.find('.highlights-button').on('click keydown', function(event) {
event.preventDefault(); if (event.type === 'click' || event.which === 13 || event.which === 32) {
this.highlightsXBlock(); event.preventDefault();
this.highlightsXBlock();
}
}.bind(this)); }.bind(this));
}, },
......
...@@ -638,6 +638,12 @@ ...@@ -638,6 +638,12 @@
.highlights-button { .highlights-button {
cursor: pointer; cursor: pointer;
color: theme-color("primary"); color: theme-color("primary");
// remove button styling
border: none;
background: none;
padding: 0;
font-weight: 600;
} }
.number-highlights { .number-highlights {
......
...@@ -203,10 +203,10 @@ if (is_proctored_exam) { ...@@ -203,10 +203,10 @@ if (is_proctored_exam) {
<% if (xblockInfo.get('highlights_enabled') && course.get('self_paced') && xblockInfo.isChapter()) { %> <% if (xblockInfo.get('highlights_enabled') && course.get('self_paced') && xblockInfo.isChapter()) { %>
<div class="block-highlights"> <div class="block-highlights">
<% var number_of_highlights = (xblockInfo.get('highlights') || []).length; %> <% var number_of_highlights = (xblockInfo.get('highlights') || []).length; %>
<span class="block-highlights-value highlights-button action-button"> <button class="block-highlights-value highlights-button action-button">
<span class="number-highlights"><%- number_of_highlights %></span> <span class="number-highlights"><%- number_of_highlights %></span>
<%- gettext('Section Highlights') %> <%- gettext('Section Highlights') %>
</span> </button>
</div> </div>
<% } %> <% } %>
<% if (xblockInfo.get('is_time_limited')) { %> <% if (xblockInfo.get('is_time_limited')) { %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment