1
0
Fork 0

Removed old unused views

This commit is contained in:
Michael Hackstein 2013-03-27 18:14:37 +01:00
parent 3465ef0c3a
commit fa3cf90321
2 changed files with 0 additions and 52 deletions

View File

@ -1,34 +0,0 @@
var FoxxListView = Backbone.View.extend({
el: '#content',
template: new EJS({url: '/_admin/html/js/templates/foxxListView.ejs'}),
events: {
// 'click button#add': 'callback'
},
initialize: function() {
this._subViews = {};
var self = this;
this.collection.fetch({
success: function() {
self.collection.each(function (foxx) {
var subView = new window.FoxxView({model: foxx});
self._subViews[foxx.get('_id')] = subView;
});
self.render();
}
});
this.render();
},
render: function() {
$(this.el).html(this.template.text);
var self = this;
_.each(this._subViews, function (v) {
$("#foxxList").append(v.render());
});
this.delegateEvents();
return this;
}
});

View File

@ -1,18 +0,0 @@
window.FoxxView = Backbone.View.extend({
tagName: 'li',
className: "span3",
template: new EJS({url: '/_admin/html/js/templates/foxxView.ejs'}),
events: {
// 'click button#add': 'callback'
},
initialize: function(){
_.bindAll(this, 'render');
},
render: function(){
$(this.el).html(this.template.render(this.model));
return $(this.el);
}
});