mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
fixes #2283 reduce font-size for initials
...and add no wrap for username
This commit is contained in:
@@ -1330,7 +1330,14 @@ function fill_container_user_info(container, user_index) {
|
|||||||
kingToDisplay.tipTip();
|
kingToDisplay.tipTip();
|
||||||
container.find(".user-container-username").append(kingToDisplay);
|
container.find(".user-container-username").append(kingToDisplay);
|
||||||
}
|
}
|
||||||
container.find(".user-container-initials span").html(get_initials(user.username)).addClass(color_icons[user.id % 5]);
|
const initial_to_fill = get_initials(user.username);
|
||||||
|
const initialSpan = container.find(".user-container-initials span");
|
||||||
|
initialSpan.html(initial_to_fill).addClass(color_icons[user.id % 5]);
|
||||||
|
if (initial_to_fill.length > 1) {
|
||||||
|
initialSpan.addClass('small');
|
||||||
|
} else {
|
||||||
|
initialSpan.removeClass('small');
|
||||||
|
}
|
||||||
container.find(".user-container-status span").html(status_to_str[user.status]);
|
container.find(".user-container-status span").html(status_to_str[user.status]);
|
||||||
container.find(".user-container-email span").html(user.email);
|
container.find(".user-container-email span").html(user.email);
|
||||||
generate_groups(container, user.groups);
|
generate_groups(container, user.groups);
|
||||||
@@ -1397,10 +1404,16 @@ function fill_user_edit_summary(user_to_edit, pop_in, isGuest) {
|
|||||||
if (isGuest) {
|
if (isGuest) {
|
||||||
pop_in.find('.user-property-initials span').removeClass(color_icons.join(' ')).addClass(color_icons[user_to_edit.id % 5]);
|
pop_in.find('.user-property-initials span').removeClass(color_icons.join(' ')).addClass(color_icons[user_to_edit.id % 5]);
|
||||||
} else {
|
} else {
|
||||||
pop_in.find('.user-property-initials span').html(get_initials(user_to_edit.username)).removeClass(color_icons.join(' ')).addClass(color_icons[user_to_edit.id % 5]);
|
const initial_to_fill = get_initials(user_to_edit.username);
|
||||||
|
const initialSpan = pop_in.find('.user-property-initials span');
|
||||||
|
initialSpan.html(initial_to_fill).removeClass(color_icons.join(' ')).addClass(color_icons[user_to_edit.id % 5]);
|
||||||
|
if (initial_to_fill.length > 1) {
|
||||||
|
initialSpan.addClass('small');
|
||||||
|
} else {
|
||||||
|
initialSpan.removeClass('small');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pop_in.find('.user-property-username span:first').html(user_to_edit.username);
|
pop_in.find('.user-property-username span:first').html(user_to_edit.username).tipTip({content: user_to_edit.username});
|
||||||
|
|
||||||
|
|
||||||
if (user_to_edit.id === connected_user || user_to_edit.id === 1) {
|
if (user_to_edit.id === connected_user || user_to_edit.id === 1) {
|
||||||
pop_in.find('.user-property-username .edit-username-specifier').show();
|
pop_in.find('.user-property-username .edit-username-specifier').show();
|
||||||
|
|||||||
@@ -1413,6 +1413,10 @@ $(document).ready(function() {
|
|||||||
width:70px;
|
width:70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-container-initials .small {
|
||||||
|
font-size: 1em !important;
|
||||||
|
}
|
||||||
|
|
||||||
.user-header-username{
|
.user-header-username{
|
||||||
width: 20%;
|
width: 20%;
|
||||||
max-width: 195px;
|
max-width: 195px;
|
||||||
@@ -1966,6 +1970,10 @@ $(document).ready(function() {
|
|||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-property-initials .small {
|
||||||
|
font-size: 3em !important;
|
||||||
|
}
|
||||||
|
|
||||||
.user-property-username {
|
.user-property-username {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
margin-bottom:45px;
|
margin-bottom:45px;
|
||||||
@@ -2223,6 +2231,7 @@ $(document).ready(function() {
|
|||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
text-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-username-specifier {
|
.edit-username-specifier {
|
||||||
|
|||||||
Reference in New Issue
Block a user