1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

fixed UI bugs for mv/del selected dirents; modified 'avatar'

This commit is contained in:
llj
2017-06-30 13:39:30 +08:00
parent b2cc92da36
commit a4d5736c68
3 changed files with 5 additions and 3 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, 160)
# Group avatar
GROUP_AVATAR_STORAGE_DIR = 'avatars/groups'
GROUP_AVATAR_DEFAULT_URL = 'avatars/groups/default.png'

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']) {