mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 07:01:12 +00:00
update
This commit is contained in:
@@ -5,7 +5,7 @@ define([
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var LibraryDirentModel = Backbone.Model.extend({
|
||||
var DirentModel = Backbone.Model.extend({
|
||||
|
||||
// get the absolute path within the library
|
||||
getPath: function() {
|
||||
@@ -50,5 +50,5 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
return LibraryDirentModel;
|
||||
return DirentModel;
|
||||
});
|
@@ -1,11 +0,0 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common',
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var LibraryModel = Backbone.Model.extend({});
|
||||
|
||||
return LibraryModel;
|
||||
});
|
27
static/scripts/sysadmin-app/models/repo.js
Normal file
27
static/scripts/sysadmin-app/models/repo.js
Normal file
@@ -0,0 +1,27 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common',
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var RepoModel = Backbone.Model.extend({
|
||||
getIconUrl: function(size) {
|
||||
var is_encrypted = this.get('encrypted');
|
||||
return Common.getLibIconUrl(is_encrypted, false, size);
|
||||
},
|
||||
|
||||
getIconTitle: function() {
|
||||
var icon_title = '';
|
||||
if (this.get('encrypted')) {
|
||||
icon_title = gettext("Encrypted library");
|
||||
} else {
|
||||
icon_title = gettext("Read-Write library");
|
||||
}
|
||||
|
||||
return icon_title;
|
||||
}
|
||||
});
|
||||
|
||||
return RepoModel;
|
||||
});
|
@@ -1,11 +0,0 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var SystemLibrary = Backbone.Model.extend({});
|
||||
|
||||
return SystemLibrary;
|
||||
});
|
@@ -5,7 +5,7 @@ define([
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var TrashLibrary = Backbone.Model.extend({});
|
||||
var SystemRepo = Backbone.Model.extend({});
|
||||
|
||||
return TrashLibrary;
|
||||
return SystemRepo;
|
||||
});
|
19
static/scripts/sysadmin-app/models/trash-repo.js
Normal file
19
static/scripts/sysadmin-app/models/trash-repo.js
Normal file
@@ -0,0 +1,19 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var TrashRepo = Backbone.Model.extend({
|
||||
getIconUrl: function(size) {
|
||||
return Common.getLibIconUrl(false, false, size);
|
||||
},
|
||||
|
||||
getIconTitle: function() {
|
||||
return gettext("Read-Write library");
|
||||
}
|
||||
});
|
||||
|
||||
return TrashRepo;
|
||||
});
|
Reference in New Issue
Block a user