Merge pull request #1735 from haiwen/new-lib-icons
[lib icons] use new lib icons
Before Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 203 B |
Before Width: | Height: | Size: 803 B After Width: | Height: | Size: 972 B |
Before Width: | Height: | Size: 918 B After Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 716 B |
BIN
media/img/lib/256/lib-encrypted.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
media/img/lib/256/lib-readonly.png
Executable file
After Width: | Height: | Size: 13 KiB |
BIN
media/img/lib/256/lib.png
Executable file
After Width: | Height: | Size: 7.6 KiB |
BIN
media/img/lib/48/lib-encrypted.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
media/img/lib/48/lib-readonly.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
media/img/lib/48/lib.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 485 B |
Before Width: | Height: | Size: 803 B |
@ -72,9 +72,9 @@
|
||||
{% for repo in owned_repos %}
|
||||
<tr>
|
||||
{% if repo.encrypted %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib-encrypted.png" width="24" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% else %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib.png" width="24" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
{% endif %}
|
||||
|
||||
{% if not repo.name %}
|
||||
|
@ -1512,9 +1512,9 @@
|
||||
</td>
|
||||
<td>
|
||||
<% if (encrypted) { %>
|
||||
<img src="{{ MEDIA_URL }}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted" %}" alt="{% trans "Encrypted" %}" />
|
||||
<img src="{{ MEDIA_URL }}img/lib/48/lib-encrypted.png" width="24" title="{% trans "Encrypted" %}" alt="{% trans "Encrypted" %}" />
|
||||
<% } else { %>
|
||||
<img src="{{ MEDIA_URL }}img/sync-folder-20.png" title="{% trans "Read-Write" %}" alt="{% trans "Read-Write" %}" />
|
||||
<img src="{{ MEDIA_URL }}img/lib/48/lib.png" width="24" title="{% trans "Read-Write" %}" alt="{% trans "Read-Write" %}" />
|
||||
<% } %>
|
||||
</td>
|
||||
<td><a href="#my-libs/lib/<%= id %>" target="_blank"><%- name %></a></td>
|
||||
|
@ -24,9 +24,9 @@
|
||||
{% for repo in org_repos %}
|
||||
<tr>
|
||||
{% if repo.encrypted %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted"%}" alt="{% trans "directory icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib-encrypted.png" width="24" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% else %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write"%}" alt="{% trans "directory icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib.png" width="24" title="{% trans "Read-Write"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% endif %}
|
||||
<td>{{ repo.name }}</td>
|
||||
<td style="font-size:11px;">{{ repo.id }}</td>
|
||||
|
@ -156,9 +156,9 @@
|
||||
{% for repo in owned_repos %}
|
||||
<tr>
|
||||
{% if repo.encrypted %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib-encrypted.png" width="24" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% else %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib.png" width="24" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
{% endif %}
|
||||
|
||||
{% if not repo.name %}
|
||||
@ -205,11 +205,11 @@
|
||||
{% for repo in in_repos %}
|
||||
<tr>
|
||||
{% if repo.encrypted %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-encrypt-20.png" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib-encrypted.png" width="24" title="{% trans "Encrypted"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% elif repo.permission == 'r' %}
|
||||
<td><img src="{{MEDIA_URL}}img/folder-no-write-20.png" title="{% trans "Read-Only"%}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib-readonly.png" width="24" title="{% trans "Read-Only"%}" alt="{% trans "library icon" %}" /></td>
|
||||
{% else %}
|
||||
<td><img src="{{MEDIA_URL}}img/sync-folder-20.png?t=1387267140" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
<td><img src="{{MEDIA_URL}}img/lib/48/lib.png" width="24" title="{% trans "Read-Write" %}" alt="{% trans "library icon" %}" /></td>
|
||||
{% endif %}
|
||||
{% if enable_sys_admin_view_repo %}
|
||||
<td><a href="{% url 'sys_admin_repo' repo.id %}">{{ repo.name }}</a></td>
|
||||
|
@ -24,7 +24,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
var m = Moment(this.model.get('del_time'));
|
||||
var tmpl;
|
||||
|
@ -33,7 +33,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate;
|
||||
$.extend(obj, {
|
||||
|
@ -19,7 +19,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate;
|
||||
_.extend(obj, {
|
||||
|
@ -49,7 +49,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
var tmpl, dropdownOptions = {};
|
||||
if ($(window).width() >= 768) {
|
||||
@ -331,10 +331,10 @@ define([
|
||||
|
||||
viewDetails: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var data = $.extend({}, obj, {
|
||||
icon_url: this.model.getIconUrl(icon_size),
|
||||
big_icon_url: this.model.getIconUrl(96)
|
||||
big_icon_url: this.model.getIconUrl()
|
||||
});
|
||||
var detailsView = this.myReposView.repoDetailsView;
|
||||
detailsView.show(data);
|
||||
|
@ -104,7 +104,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON(),
|
||||
icon_size = Common.isHiDPI() ? 96 : 24,
|
||||
icon_size = Common.isHiDPI() ? 48 : 24,
|
||||
icon_url = this.model.getIconUrl(icon_size);
|
||||
|
||||
_.extend(obj, {
|
||||
|
@ -47,7 +47,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var obj = this.model.toJSON();
|
||||
var icon_size = Common.isHiDPI() ? 96 : 24;
|
||||
var icon_size = Common.isHiDPI() ? 48 : 24;
|
||||
var icon_url = this.model.getIconUrl(icon_size);
|
||||
var tmpl = $(window).width() >= 768 ? this.template : this.mobileTemplate;
|
||||
_.extend(obj, {
|
||||
|
@ -295,23 +295,20 @@ define([
|
||||
},
|
||||
|
||||
getLibIconUrl: function(is_encrypted, is_readonly, size) {
|
||||
if (size > 24) {
|
||||
|
||||
// icon name
|
||||
var icon_name = 'lib.png';
|
||||
if (is_encrypted) {
|
||||
return app.config.mediaUrl + "img/lib/96/lib-encrypted.png";
|
||||
} else if (is_readonly) {
|
||||
return app.config.mediaUrl + "img/lib/96/lib-readonly.png";
|
||||
} else {
|
||||
return app.config.mediaUrl + "img/lib/96/lib.png";
|
||||
}
|
||||
} else {
|
||||
if (is_encrypted) {
|
||||
return app.config.mediaUrl + "img/lib/24/lib-encrypted.png";
|
||||
} else if (is_readonly) {
|
||||
return app.config.mediaUrl + "img/lib/24/lib-readonly.png";
|
||||
} else {
|
||||
return app.config.mediaUrl + "img/lib/24/lib.png";
|
||||
icon_name = 'lib-encrypted.png';
|
||||
}
|
||||
if (is_readonly) {
|
||||
icon_name = 'lib-readonly.png';
|
||||
}
|
||||
|
||||
// icon size
|
||||
var icon_size = size || 256; // 'size' can be 24, 48, or undefined. (2017.7.31)
|
||||
|
||||
return app.config.mediaUrl + 'img/lib/' + icon_size + '/' + icon_name;
|
||||
},
|
||||
|
||||
getLibIconTitle: function(is_encrypted, is_readonly) {
|
||||
|
@ -56,7 +56,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var data = this.model.toJSON(),
|
||||
icon_size = Common.isHiDPI() ? 96 : 24,
|
||||
icon_size = Common.isHiDPI() ? 48 : 24,
|
||||
icon_url = this.model.getIconUrl(icon_size);
|
||||
|
||||
data['icon_url'] = icon_url;
|
||||
|
@ -153,7 +153,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var data = this.model.toJSON(),
|
||||
icon_size = Common.isHiDPI() ? 96 : 24,
|
||||
icon_size = Common.isHiDPI() ? 48 : 24,
|
||||
icon_url = this.model.getIconUrl(icon_size),
|
||||
last_accessed = Moment(data['last_accessed']);
|
||||
|
||||
|
@ -84,7 +84,7 @@ define([
|
||||
|
||||
render: function() {
|
||||
var data = this.model.toJSON(),
|
||||
icon_size = Common.isHiDPI() ? 96 : 24,
|
||||
icon_size = Common.isHiDPI() ? 48 : 24,
|
||||
icon_url = this.model.getIconUrl(icon_size),
|
||||
delete_time = Moment(data['delete_time']);
|
||||
|
||||
|