1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-22 13:18:42 +00:00
seahub/static/scripts/sysadmin-app/collection/repos.js

25 lines
649 B
JavaScript
Raw Normal View History

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