git-svn-id: https://msi/svn/firstRepo/WebClient/branches/NewRelease@33 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
define(['jquery', 'underscore', 'backbone','text!modules/donation/donationViewTemplate.html', 'modules/base/baseView'],
|
||||
function($, _, Backbone, homeViewTemplate, BaseView){
|
||||
define(['jquery', 'underscore', 'backbone', 'text!modules/donation/donationViewTemplate.html', 'modules/base/baseView'],
|
||||
function ($, _, Backbone, homeViewTemplate, BaseView) {
|
||||
|
||||
var DonationView = BaseView.extend({
|
||||
|
||||
//initialize template
|
||||
template:_.template(homeViewTemplate),
|
||||
|
||||
initialize: function () {
|
||||
DonationView.__super__.initialize.call(this);
|
||||
//this.header.title = "pippo";
|
||||
},
|
||||
|
||||
//render the content into div of view
|
||||
render: function(){
|
||||
//this.header.title = "pippo";
|
||||
DonationView.__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());
|
||||
this.$el.append(this.footer.$el);
|
||||
this.$el.find("#moreBtn").addClass("ui-btn-active");
|
||||
//$("#homeBtn").addClass("ui-btn-active");
|
||||
//return to enable chained calls
|
||||
return this;
|
||||
}
|
||||
});
|
||||
return DonationView;
|
||||
});
|
||||
var DonationView = BaseView.extend({
|
||||
//initialize template
|
||||
template: _.template(homeViewTemplate),
|
||||
initialize: function () {
|
||||
this.id = "DonationView";
|
||||
DonationView.__super__.initialize.call(this);
|
||||
},
|
||||
//render the content into div of view
|
||||
render: function () {
|
||||
if (this.created === true)
|
||||
{
|
||||
//this.header.title = "pippo";
|
||||
DonationView.__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());
|
||||
this.$el.append(this.footer.$el);
|
||||
this.$el.find("#moreBtn").addClass("ui-btn-active");
|
||||
}
|
||||
//$("#homeBtn").addClass("ui-btn-active");
|
||||
//return to enable chained calls
|
||||
return this;
|
||||
}
|
||||
});
|
||||
return DonationView;
|
||||
});
|
||||
Reference in New Issue
Block a user