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:
24
static/scripts/sysadmin-app/collection/groups.js
Normal file
24
static/scripts/sysadmin-app/collection/groups.js
Normal 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;
|
||||
});
|
Reference in New Issue
Block a user