removed redundant ribica name from subfolders
This commit is contained in:
35
front-ui/app/views/startPageSectionsView.js
Normal file
35
front-ui/app/views/startPageSectionsView.js
Normal 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;
|
||||
Reference in New Issue
Block a user