This commit implements STUD-1490, allowing creation of components on the container page. It also enables the delete and duplicate buttons now that new content can be created that would benefit. Note that it also creates shared functionality for adding components, and refactors the unit page to use it too.
14 lines
451 B
JavaScript
14 lines
451 B
JavaScript
define(["js/views/baseview"],
|
|
function (BaseView) {
|
|
|
|
return BaseView.extend({
|
|
tagName: "li",
|
|
initialize: function () {
|
|
BaseView.prototype.initialize.call(this);
|
|
this.template = this.loadTemplate("add-xblock-component-button");
|
|
this.$el.html(this.template({type: this.model.type, templates: this.model.templates}));
|
|
}
|
|
});
|
|
|
|
}); // end define();
|