1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-20 12:22:24 +00:00
seahub/static/scripts/sysadmin-app/collection/trash-repos.js

30 lines
695 B
JavaScript
Raw Normal View History

2016-05-27 08:42:40 +00:00
define([
'underscore',
'backbone.paginator',
2016-05-27 08:42:40 +00:00
'common',
'sysadmin-app/models/trash-repo'
], function(_, BackbonePaginator, Common, TrashRepoModel) {
2016-05-27 08:42:40 +00:00
'use strict';
var TrashRepoCollection = Backbone.PageableCollection.extend({
2016-05-27 08:42:40 +00:00
model: TrashRepoModel,
2016-05-27 08:42:40 +00:00
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;
2016-05-27 08:42:40 +00:00
}
2016-05-27 08:42:40 +00:00
});
return TrashRepoCollection;
});