30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
define(['jquery', 'underscore', 'backbone','text!modules/about/aboutViewTemplate.html', 'modules/base/baseView'],
|
|
function($, _, Backbone, aboutViewTemplate, BaseView){
|
|
|
|
var AboutView = BaseView.extend({
|
|
|
|
//initialize template
|
|
template:_.template(aboutViewTemplate),
|
|
|
|
initialize: function () {
|
|
AboutView.__super__.initialize.call(this);
|
|
},
|
|
|
|
//render the content into div of view
|
|
render: function(){
|
|
//this.header.title = "pippo";
|
|
AboutView.__super__.render.call(this);
|
|
//this.el is the root element of Backbone.View. By default, it is a div.
|
|
//$el is cached jQuery object for the view's element.
|
|
//append the compiled template into view div container
|
|
this.$el.append(this.header.$el);
|
|
this.$el.append(this.template( { app: myManifest }));
|
|
this.$el.append(this.footer.$el);
|
|
this.$el.find("#infoBtn").addClass("ui-btn-active");
|
|
//$("#homeBtn").addClass("ui-btn-active");
|
|
//return to enable chained calls
|
|
return this;
|
|
}
|
|
});
|
|
return AboutView;
|
|
}); |