mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-16 08:16:55 +00:00
28 lines
615 B
JavaScript
28 lines
615 B
JavaScript
|
define([
|
||
|
'jquery',
|
||
|
'underscore',
|
||
|
'backbone',
|
||
|
'text!' + app.config._tmplRoot + 'dirents.html'
|
||
|
], function($, _, Backbone, direntsTemplate) {
|
||
|
'use strict';
|
||
|
|
||
|
var DirentView = Backbone.View.extend({
|
||
|
tagName: 'tr',
|
||
|
|
||
|
template: _.template(direntsTemplate),
|
||
|
|
||
|
initialize: function() {
|
||
|
console.log('init DirentView');
|
||
|
Backbone.View.prototype.initialize.apply(this, arguments);
|
||
|
},
|
||
|
|
||
|
render: function() {
|
||
|
this.$el.html(this.template(this.model.toJSON()));
|
||
|
return this;
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
return DirentView;
|
||
|
});
|