mirror of https://gitee.com/bigwinds/arangodb
Removed old unused views
This commit is contained in:
parent
3465ef0c3a
commit
fa3cf90321
|
@ -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;
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
});
|
|
Loading…
Reference in New Issue