mirror of
https://github.com/haiwen/seahub.git
synced 2025-06-20 04:12:17 +00:00
30 lines
695 B
JavaScript
30 lines
695 B
JavaScript
define([
|
|
'underscore',
|
|
'backbone.paginator',
|
|
'common',
|
|
'sysadmin-app/models/trash-repo'
|
|
], function(_, BackbonePaginator, Common, TrashRepoModel) {
|
|
'use strict';
|
|
|
|
var TrashRepoCollection = Backbone.PageableCollection.extend({
|
|
model: TrashRepoModel,
|
|
|
|
url: function () {
|
|
return Common.getUrl({name: 'admin-trash-libraries'});
|
|
},
|
|
|
|
state: {pageSize: 100},
|
|
|
|
parseState: function(data) {
|
|
return data.page_info; // {'has_next_page': has_next_page, 'current_page': current_pag
|
|
},
|
|
|
|
parseRecords: function(data) {
|
|
return data.repos;
|
|
}
|
|
|
|
});
|
|
|
|
return TrashRepoCollection;
|
|
});
|