one git repo to rule them all\!

This commit is contained in:
Senad Uka
2015-01-22 06:38:48 +01:00
parent c003584f7e
commit 23a6fda854
149 changed files with 967 additions and 4 deletions

View File

@@ -0,0 +1,35 @@
var Backbone = require('backbone'),
React = require('react'),
SectionsViewComponent = require('../components/sectionsListComponent'),
SectionCollection = require('../models/sectionCollection'),
Section = require('../models/section');
var StartPageSectionsView = Backbone.View.extend({
el: '#content',
template: '<div class="section-list-container"></div>',
initialize: function() {
//alert('StartPageSectionsView init');
},
render: function() {
this.$el.append(this.template);
var sections = new SectionCollection();
var self = this;
sections.fetch({success: function() {
console.log(sections);
React.render(new SectionsViewComponent({
handleClick: self.clickHandler.bind(self),
sections: sections
}),
self.$('.section-list-container').get(0));
}});
return this;
},
clickHandler : function() {
alert('the item was clicked!');
}
});
module.exports = StartPageSectionsView;