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:
@@ -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)
|
||||
|
@@ -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'
|
||||
|
@@ -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']) {
|
||||
|
Reference in New Issue
Block a user