mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-14 14:21:23 +00:00
Improve library icon
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
define([
|
||||
'underscore',
|
||||
'backbone'
|
||||
], function(_, Backbone) {
|
||||
'backbone',
|
||||
'common'
|
||||
], function(_, Backbone, Common) {
|
||||
'use strict';
|
||||
|
||||
var Repo = Backbone.Model.extend({
|
||||
@@ -14,7 +15,8 @@ define([
|
||||
mtime_relative: "",
|
||||
encrypted: false,
|
||||
owner: "-",
|
||||
owner_nickname: "-"
|
||||
owner_nickname: "-",
|
||||
permission: "rw"
|
||||
},
|
||||
|
||||
parse: function(response) {
|
||||
@@ -37,6 +39,12 @@ define([
|
||||
}
|
||||
if (attrs.passwd1 != attrs.passwd2) return gettext("Passwords don't match");
|
||||
}
|
||||
},
|
||||
|
||||
getIconUrl: function(size) {
|
||||
var is_encrypted = this.get('encrypted');
|
||||
var is_readonly = this.get('permission') == "r" ? true : false;
|
||||
return Common.getLibIconUrl(is_encrypted, is_readonly, size);
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user