Re-render XBlockOutlineView on highlights change

This commit is contained in:
Tyler Hallada
2017-11-08 13:29:44 -05:00
parent 43d6cc209b
commit 1927551ac6
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();
}
},