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
event.preventDefault();
this.publishXBlock();
}.bind(this));
element.find('.highlights-button').click(function(event) {
event.preventDefault();
this.highlightsXBlock();
element.find('.highlights-button').on('click keydown', function(event) {
if (event.type === 'click' || event.which === 13 || event.which === 32) {
event.preventDefault();
this.highlightsXBlock();
}
}.bind(this));
},
......
......@@ -638,6 +638,12 @@
.highlights-button {
cursor: pointer;
color: theme-color("primary");
// remove button styling
border: none;
background: none;
padding: 0;
font-weight: 600;
}
.number-highlights {
......
......@@ -203,10 +203,10 @@ if (is_proctored_exam) {
<% if (xblockInfo.get('highlights_enabled') && course.get('self_paced') && xblockInfo.isChapter()) { %>
<div class="block-highlights">
<% 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>
<%- gettext('Section Highlights') %>
</span>
</button>
</div>
<% } %>
<% 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