1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 22:01:06 +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

@@ -2,12 +2,12 @@ define([
'underscore',
'backbone',
'common',
'sysadmin-app/models/library-dirent'
], function(_, Backbone, Common, LibraryDirentModel) {
'sysadmin-app/models/dirent'
], function(_, Backbone, Common, DirentModel) {
'use strict';
var LibraryDirentCollection = Backbone.Collection.extend({
model: LibraryDirentModel,
var DirentCollection = Backbone.Collection.extend({
model: DirentModel,
parse: function (data) {
this.repo_name = data.repo_name;
this.repo_id = data.repo_id;
@@ -20,5 +20,5 @@ define([
}
});
return LibraryDirentCollection;
return DirentCollection;
});

View File

@@ -2,12 +2,12 @@ define([
'underscore',
'backbone.paginator',
'common',
'sysadmin-app/models/library'
], function(_, BackbonePaginator, Common, LibraryModel) {
'sysadmin-app/models/repo'
], function(_, BackbonePaginator, Common, RepoModel) {
'use strict';
var LibraryCollection = Backbone.PageableCollection.extend({
model: LibraryModel,
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};
@@ -20,5 +20,5 @@ define([
}
});
return LibraryCollection;
return RepoCollection;
});

View File

@@ -1,17 +0,0 @@
define([
'underscore',
'backbone',
'common',
'sysadmin-app/models/trash-library'
], function(_, Backbone, Common, TrashLibraryModel) {
'use strict';
var TrashLibraryCollection = Backbone.Collection.extend({
model: TrashLibraryModel,
url: function () {
return Common.getUrl({name: 'admin-trash-libraries'});
}
});
return TrashLibraryCollection;
});

View File

@@ -0,0 +1,17 @@
define([
'underscore',
'backbone',
'common',
'sysadmin-app/models/trash-repo'
], function(_, Backbone, Common, TrashRepoModel) {
'use strict';
var TrashRepoCollection = Backbone.Collection.extend({
model: TrashRepoModel,
url: function () {
return Common.getUrl({name: 'admin-trash-libraries'});
}
});
return TrashRepoCollection;
});