1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00
This commit is contained in:
lian
2016-05-27 16:42:40 +08:00
parent 72f4297934
commit a767aeb3d8
22 changed files with 240 additions and 212 deletions

View 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;
});