Mark components like libraryv2 and problem bank beta in API to be used by both legacy templates and new authoring mfe. Also updates order of components.
21 lines
769 B
JavaScript
21 lines
769 B
JavaScript
define(['js/views/baseview', 'edx-ui-toolkit/js/utils/html-utils'],
|
|
function(BaseView, HtmlUtils) {
|
|
'use strict';
|
|
|
|
return BaseView.extend({
|
|
tagName: 'li',
|
|
initialize: function() {
|
|
var attributes = {
|
|
type: this.model.type,
|
|
templates: this.model.templates,
|
|
display_name: this.model.display_name,
|
|
beta: this.model.beta,
|
|
};
|
|
BaseView.prototype.initialize.call(this);
|
|
this.template = this.loadTemplate('add-xblock-component-button');
|
|
this.$el.html(HtmlUtils.HTML(this.template(attributes)).toString()
|
|
);
|
|
}
|
|
});
|
|
}); // end define();
|