MDL-58235 block_myoverview: fix buttons on courses view

This commit is contained in:
Ryan Wyllie 2017-04-11 00:20:29 +00:00
parent 24b423fdd1
commit db861ea9d7

View File

@ -107,8 +107,9 @@
require(['jquery', 'core/custom_interaction_events'], function($, customEvents) {
var root = $('#courses-view-{{uniqid}}');
customEvents.define(root, [customEvents.events.activate]);
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function() {
root.on(customEvents.events.activate, '[data-toggle="btns"] > .btn', function(e) {
root.find('.btn.active').removeClass('active');
$(e.target).closest('.btn').addClass('active');
});
});
{{/js}}