1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

Make open-via-client in community edition and clean code for file/dir icons

This commit is contained in:
Daniel Pan
2016-02-29 15:29:29 +08:00
parent 003838b8f1
commit 463b48c788
23 changed files with 119 additions and 33 deletions

View File

@@ -13,6 +13,15 @@ define([
return Common.pathJoin([this.collection.path, this.get('obj_name')]);
},
getIconUrl: function(size) {
if (this.get('is_dir')) {
var is_readonly = this.get('perm') == 'r';
return Common.getDirIconUrl(is_readonly, size);
} else {
return Common.getFileIconUrl(this.get('obj_name'), size);
}
},
// return the URL to visit the folder or file
getWebUrl: function() {
var dir = this.collection;