1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 07:47:32 +00:00

Merge pull request #1669 from haiwen/fix

fixed UI bugs for mv/del selected dirents; modified 'avatar'
This commit is contained in:
xiez 2017-07-03 15:00:18 +08:00 committed by GitHub
commit 4c5ca6292d
4 changed files with 6 additions and 4 deletions

View File

@ -54,7 +54,7 @@ def avatar(user, size=AVATAR_DEFAULT_SIZE):
if not isinstance(user, User):
try:
user = User.objects.get(email=user)
url = avatar_url(user, size)
url = avatar_url(user, size*2)
except User.DoesNotExist:
url = get_default_avatar_non_registered_url()
except Exception as e:
@ -63,7 +63,7 @@ def avatar(user, size=AVATAR_DEFAULT_SIZE):
url = get_default_avatar_non_registered_url()
else:
try:
url = avatar_url(user, size)
url = avatar_url(user, size*2)
except Exception as e:
# Catch exceptions to avoid 500 errors.
logger.error(e)

View File

@ -338,7 +338,7 @@ AVATAR_DEFAULT_URL = '/avatars/default.png'
AVATAR_DEFAULT_NON_REGISTERED_URL = '/avatars/default-non-register.jpg'
AVATAR_MAX_AVATARS_PER_USER = 1
AVATAR_CACHE_TIMEOUT = 14 * 24 * 60 * 60
AUTO_GENERATE_AVATAR_SIZES = (16, 20, 24, 28, 32, 36, 40, 42, 48, 60, 64, 80, 84)
AUTO_GENERATE_AVATAR_SIZES = (16, 20, 24, 28, 32, 36, 40, 42, 48, 60, 64, 72, 80, 84, 96, 128, 160)
# Group avatar
GROUP_AVATAR_STORAGE_DIR = 'avatars/groups'
GROUP_AVATAR_DEFAULT_URL = 'avatars/groups/default.png'

View File

@ -24,7 +24,7 @@
<span class="meta-info split">
<span class="author">
{% if current_commit.props.creator_name %}
<img src="{% avatar_url current_commit.props.creator_name 20 %}" width="20" class="avatar" />
<img src="{% avatar_url current_commit.props.creator_name 40 %}" width="20" class="avatar" />
<a class="name" href="{% url 'user_profile' current_commit.props.creator_name %}">{{ current_commit.props.creator_name|email2nickname }}</a>
{% else %}
{% trans "Unknown"%}

View File

@ -1000,6 +1000,7 @@ define([
_this.$('th .checkbox').removeClass('checkbox-checked');
_this.$('#multi-dirents-op').hide();
_this.$('#cur-dir-ops').show();
_this.updateDirOpBarUI();
} else {
$(selected_dirents).each(function() {
if (data['deleted'].indexOf(this.get('obj_name')) != -1) {
@ -1144,6 +1145,7 @@ define([
_this.$('th .checkbox').removeClass('checkbox-checked');
_this.$('#multi-dirents-op').hide();
_this.$('#cur-dir-ops').show();
_this.updateDirOpBarUI();
} else {
$(dirs).each(function() {
if (this.get('obj_name') in data['success']) {