1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-30 08:53:49 +00:00
seahub/static/scripts/app/collections/group-discussions.js

31 lines
678 B
JavaScript
Raw Normal View History

2016-03-08 05:36:58 +00:00
define([
'underscore',
'backbone',
2016-03-18 03:21:26 +00:00
'common',
'app/models/group-discussion'
], function(_, Backbone, Common, GroupDiscussion) {
2016-03-08 05:36:58 +00:00
'use strict';
var GroupDiscussions = Backbone.Collection.extend({
2016-03-18 03:21:26 +00:00
model: GroupDiscussion,
2016-03-08 05:36:58 +00:00
setGroupId: function(group_id) {
this.group_id = group_id;
},
url: function() {
return Common.getUrl({name: 'group_discussions', group_id: this.group_id});
2016-03-25 09:54:53 +00:00
},
parse: function(data) {
this.current_page = data.current_page;
this.page_num = data.page_num;
return data.msgs;
2016-03-08 05:36:58 +00:00
}
2016-03-18 03:21:26 +00:00
2016-03-08 05:36:58 +00:00
});
return GroupDiscussions;
});