mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-13 22:01:06 +00:00
update
This commit is contained in:
@@ -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;
|
||||
});
|
@@ -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;
|
||||
});
|
@@ -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;
|
||||
});
|
17
static/scripts/sysadmin-app/collection/trash-repos.js
Normal file
17
static/scripts/sysadmin-app/collection/trash-repos.js
Normal 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;
|
||||
});
|
Reference in New Issue
Block a user