diff --git a/cms/static/js/spec/views/pages/course_outline_spec.js b/cms/static/js/spec/views/pages/course_outline_spec.js index f92b986bb6..b2f0387fd6 100644 --- a/cms/static/js/spec/views/pages/course_outline_spec.js +++ b/cms/static/js/spec/views/pages/course_outline_spec.js @@ -532,7 +532,7 @@ define(['jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'common/j describe('Section Highlights', function() { var createCourse, createCourseWithHighlights, createCourseWithHighlightsDisabled, mockHighlightValues, highlightsLink, highlightInputs, openHighlights, saveHighlights, setHighlights, - expectHighlightLinkTextToBe, expectHighlightsToBe, expectServerHandshakeWithHighlights, + expectHighlightLinkNumberToBe, expectHighlightsToBe, expectServerHandshakeWithHighlights, expectHighlightsToUpdate, maxNumHighlights = 5; @@ -591,8 +591,10 @@ define(['jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'common/j } }; - expectHighlightLinkTextToBe = function(expectedValue) { - expect(highlightsLink()).toContainText(expectedValue); + expectHighlightLinkNumberToBe = function(expectedNumber) { + var link = highlightsLink(); + expect(link).toContainText('Section Highlights'); + expect(link.find('.number-highlights')).toHaveHtml(expectedNumber); }; expectHighlightsToBe = function(expectedHighlights) { @@ -645,13 +647,13 @@ define(['jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'common/j it('displays link when no highlights exist', function() { createCourseWithHighlights([]); - expectHighlightLinkTextToBe('Enter Section Highlights'); + expectHighlightLinkNumberToBe(0); }); it('displays link when highlights exist', function() { var highlights = mockHighlightValues(2); createCourseWithHighlights(highlights); - expectHighlightLinkTextToBe('Section Highlights: 2 entered'); + expectHighlightLinkNumberToBe(2); }); it('can view when no highlights exist', function() { diff --git a/cms/static/sass/views/_outline.scss b/cms/static/sass/views/_outline.scss index f2702cbfcd..ab5880b39b 100644 --- a/cms/static/sass/views/_outline.scss +++ b/cms/static/sass/views/_outline.scss @@ -640,10 +640,24 @@ color: theme-color("primary"); } + .number-highlights { + background: theme-color("primary"); + border-radius: 50%; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + color: $white; + display: inline-block; + font-weight: bold; + line-height: 18px; + margin-right: 2px; + text-align: center; + width: 18px; + } + .highlight-input-text { width: 100%; - margin-bottom: 5px; - margin-top: 5px; + margin-bottom: ($baseline/4); + margin-top: ($baseline/4); } .highlights-description { diff --git a/cms/templates/js/course-outline.underscore b/cms/templates/js/course-outline.underscore index 30a3506920..22dbb071c1 100644 --- a/cms/templates/js/course-outline.underscore +++ b/cms/templates/js/course-outline.underscore @@ -201,20 +201,13 @@ if (is_proctored_exam) { <% } %> <% if (xblockInfo.get('highlights_enabled') && course.get('self_paced') && xblockInfo.isChapter()) { %> -