mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 07:27:04 +00:00
[dir view] added 'file comment'
This commit is contained in:
24
static/scripts/app/collections/file-comments.js
Normal file
24
static/scripts/app/collections/file-comments.js
Normal file
@@ -0,0 +1,24 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var collection = Backbone.Collection.extend({
|
||||
|
||||
url: function() {
|
||||
return Common.getUrl({name: 'file-comments', repo_id: this.repo_id});
|
||||
},
|
||||
|
||||
parse: function(data) {
|
||||
return data.comments; // return the array
|
||||
},
|
||||
|
||||
setData: function(repo_id) {
|
||||
this.repo_id = repo_id;
|
||||
}
|
||||
});
|
||||
|
||||
return collection;
|
||||
});
|
Reference in New Issue
Block a user