Skip to content

Instantly share code, notes, and snippets.

@syabro
Created March 17, 2012 00:25
Show Gist options
  • Save syabro/2053845 to your computer and use it in GitHub Desktop.
Save syabro/2053845 to your computer and use it in GitHub Desktop.
(function (App) {
App.Pages.StorePage = Backbone.View.extend({
name: 'store',
container: '#page_container',
template: '#market_page_template',
initialize: function () {
},
render: function () {
this.setElement($(this.container));
var template = _.template($(this.template).html());
this.$el.html(template({}));
this.renderCategories();
this.renderSoftware();
return this;
},
renderCategories: function () {
this.categoriesList = new App.Views.CategoryListView({el: this.$('.categorylist ul'), page: this});
this.categoriesList.loadTopCategories();
this.categoriesList.render();
},
renderSoftware: function () {
this.softwareListView = new SoftwareListView({el: this.$('.softwarelist')});
this.loadSoftware({ staff_pick: true });
this.softwareListView.render();
},
loadSoftware: function (data) {
this.softwareListView.loadSoftware(data);
}
// setAction: function(action, param1)
});
}(window.App));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment