1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

Split js from django template, move js to scripts , add requirejs support, and i18n for js

This commit is contained in:
zhengxie
2015-01-20 18:25:10 +08:00
committed by Daniel Pan
parent 0a494cd0d3
commit 92be0754bd
24 changed files with 5908 additions and 202 deletions

View File

@@ -0,0 +1,27 @@
define([
'jquery',
'underscore',
'backbone',
'text!' + app.config._tmplRoot + 'repos.html'
], function($, _, Backbone, reposTemplate) {
'use strict';
var RepoView = Backbone.View.extend({
tagName: 'tr',
template: _.template(reposTemplate),
initialize: function() {
console.log('init RepoView');
Backbone.View.prototype.initialize.apply(this, arguments);
},
render: function() {
this.$el.html(this.template(this.model.toJSON()));
return this;
}
});
return RepoView;
});