mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[lib list] modification about 'icon_title'
This commit is contained in:
@@ -45,6 +45,19 @@ define([
|
||||
var is_encrypted = this.get('encrypted');
|
||||
var is_readonly = this.get('permission') == "r" ? true : false;
|
||||
return Common.getLibIconUrl(is_encrypted, is_readonly, size);
|
||||
},
|
||||
|
||||
getIconTitle: function() {
|
||||
var icon_title = '';
|
||||
if (this.get('encrypted')) {
|
||||
icon_title = gettext("Encrypted");
|
||||
} else if (this.get('permission') == "rw") {
|
||||
icon_title = gettext("Read-Write");
|
||||
} else {
|
||||
icon_title = gettext("Read-Only");
|
||||
}
|
||||
|
||||
return icon_title;
|
||||
}
|
||||
|
||||
});
|
||||
|
@@ -41,7 +41,8 @@ define([
|
||||
// 'owner_name' for '#groups', 'owner_nickname' for '#group/id/'
|
||||
owner_name: this.model.get('owner_nickname') || this.model.get('owner_name'),
|
||||
show_shared_by: this.show_shared_by,
|
||||
icon_url: icon_url
|
||||
icon_url: icon_url,
|
||||
icon_title: this.model.getIconTitle()
|
||||
});
|
||||
this.$el.html(this.template(obj));
|
||||
return this;
|
||||
|
@@ -18,7 +18,10 @@ define([
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
_.extend(obj, { 'icon_url': icon_url });
|
||||
_.extend(obj, {
|
||||
'icon_url': icon_url,
|
||||
'icon_title': this.model.getIconTitle()
|
||||
});
|
||||
this.$el.html(this.template(obj));
|
||||
return this;
|
||||
},
|
||||
|
@@ -42,7 +42,10 @@ define([
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
_.extend(obj, { 'icon_url': icon_url });
|
||||
_.extend(obj, {
|
||||
'icon_url': icon_url,
|
||||
'icon_title': this.model.getIconTitle()
|
||||
});
|
||||
this.$el.html(this.template(obj));
|
||||
return this;
|
||||
},
|
||||
|
@@ -50,7 +50,10 @@ define([
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
_.extend(obj, { 'icon_url': icon_url });
|
||||
_.extend(obj, {
|
||||
'icon_url': icon_url,
|
||||
'icon_title': this.model.getIconTitle()
|
||||
});
|
||||
this.$el.html(this.template(obj));
|
||||
return this;
|
||||
},
|
||||
|
Reference in New Issue
Block a user