ECOM-4215 adding setup for new program details page

This commit is contained in:
AlasdairSwan
2016-05-09 14:52:48 -04:00
parent 91d049794b
commit bc5daffc96
16 changed files with 213 additions and 10 deletions

View 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);

View File

@@ -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);