Merge pull request #16501 from edx/thallada/ret-fix-highlights-number

Re-render XBlockOutlineView on highlights change
This commit is contained in:
Gabe Mulley
2017-11-09 10:33:09 -05:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -635,6 +635,7 @@ define(['jquery', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers', 'common/j
saveHighlights();
expectServerHandshakeWithHighlights(updatedHighlights);
expectHighlightLinkNumberToBe(updatedHighlights.length);
openHighlights();
expectHighlightsToBe(updatedHighlights);

View File

@@ -224,7 +224,11 @@ define(['jquery', 'underscore', 'gettext', 'js/views/baseview', 'common/js/compo
},
onSync: function(event) {
if (ViewUtils.hasChangedAttributes(this.model, ['visibility_state', 'child_info', 'display_name'])) {
var hasChangedAttributes = ViewUtils.hasChangedAttributes(
this.model,
['visibility_state', 'child_info', 'display_name', 'highlights']
);
if (hasChangedAttributes) {
this.onXBlockChange();
}
},