ECOM-4215 adding setup for new program details page
This commit is contained in:
13
lms/static/js/learner_dashboard/program_details_factory.js
Normal file
13
lms/static/js/learner_dashboard/program_details_factory.js
Normal file
@@ -0,0 +1,13 @@
|
||||
;(function (define) {
|
||||
'use strict';
|
||||
|
||||
define([
|
||||
'js/learner_dashboard/views/program_details_view'
|
||||
],
|
||||
function(ProgramDetailsView) {
|
||||
return function (options) {
|
||||
var ProgramDetails = new ProgramDetailsView(options);
|
||||
return ProgramDetails;
|
||||
};
|
||||
});
|
||||
}).call(this, define || RequireJS.define);
|
||||
@@ -0,0 +1,38 @@
|
||||
;(function (define) {
|
||||
'use strict';
|
||||
|
||||
define(['backbone',
|
||||
'jquery',
|
||||
'underscore',
|
||||
'gettext',
|
||||
'text!../../../templates/learner_dashboard/program_details_view.underscore'
|
||||
],
|
||||
function(
|
||||
Backbone,
|
||||
$,
|
||||
_,
|
||||
gettext,
|
||||
pageTpl
|
||||
) {
|
||||
return Backbone.View.extend({
|
||||
el: '.js-program-details-wrapper',
|
||||
|
||||
tpl: _.template(pageTpl),
|
||||
|
||||
initialize: function(data) {
|
||||
this.context = data.context;
|
||||
this.render();
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.tpl(this.context));
|
||||
this.postRender();
|
||||
},
|
||||
|
||||
postRender: function() {
|
||||
// Add subviews
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
}).call(this, define || RequireJS.define);
|
||||
Reference in New Issue
Block a user