1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

new admin groups page

This commit is contained in:
lian
2016-07-20 12:26:54 +08:00
parent a0ab79f26b
commit 744efb2322
13 changed files with 672 additions and 104 deletions

View File

@@ -0,0 +1,24 @@
define([
'underscore',
'backbone.paginator',
'common',
'sysadmin-app/models/group'
], function(_, BackbonePaginator, Common, GroupModel) {
'use strict';
var GroupCollection = Backbone.PageableCollection.extend({
model: GroupModel,
state: {pageSize: 100},
parseState: function(data) {
return data.page_info; // {'has_next_page': has_next_page, 'current_page': current_page}
},
parseRecords: function(data) {
return data.groups;
},
url: function () {
return Common.getUrl({name: 'admin-groups'});
}
});
return GroupCollection;
});