mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-02 15:38:15 +00:00
update
This commit is contained in:
24
static/scripts/sysadmin-app/collection/repos.js
Normal file
24
static/scripts/sysadmin-app/collection/repos.js
Normal file
@@ -0,0 +1,24 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone.paginator',
|
||||
'common',
|
||||
'sysadmin-app/models/repo'
|
||||
], function(_, BackbonePaginator, Common, RepoModel) {
|
||||
'use strict';
|
||||
|
||||
var RepoCollection = Backbone.PageableCollection.extend({
|
||||
model: RepoModel,
|
||||
state: {pageSize: 100},
|
||||
parseState: function(data) {
|
||||
return {hasNextPage: data[0].has_next_page, current_page: data[0].current_page};
|
||||
},
|
||||
parseRecords: function(data) {
|
||||
return data[1];
|
||||
},
|
||||
url: function () {
|
||||
return Common.getUrl({name: 'admin-libraries'});
|
||||
}
|
||||
});
|
||||
|
||||
return RepoCollection;
|
||||
});
|
Reference in New Issue
Block a user