[DE mobile] Add initials for users
This commit is contained in:
parent
d3551bb26a
commit
0983f77969
|
@ -580,7 +580,7 @@ define([
|
|||
'<% _.each(users, function(item) { %>',
|
||||
'<li id="<%= item.id %>" class="<% if (item.view) {%> viewmode <% } %> item-content">' +
|
||||
'<div class="user-name item-inner">' +
|
||||
'<div class="color" style="background-color: <%= item.color %>;"></div>'+
|
||||
'<div class="color" style="background-color: <%= item.color %>;"><%= item.initial %></div>'+
|
||||
'<label><%= item.name %></label>' +
|
||||
'<% if (item.len>1) { %><label class="length"> (<%= item.len %>)</label><% } %>' +
|
||||
'</div>'+
|
||||
|
@ -591,14 +591,19 @@ define([
|
|||
usersSort = [],
|
||||
len;
|
||||
_.each(editUsers, function(item){
|
||||
users.push({color: item.asc_getColor(), id: item.id, idOriginal: item.idOriginal, name: item.userName, view: item.view})
|
||||
var fio = item.userName.split(' ');
|
||||
var initials = fio[0].substring(0, 1).toUpperCase();
|
||||
if (fio.length > 1) {
|
||||
initials += fio[fio.length - 1].substring(0, 1).toUpperCase();
|
||||
}
|
||||
users.push({color: item.asc_getColor(), id: item.id, idOriginal: item.idOriginal, name: item.userName, view: item.view, initial: initials})
|
||||
});
|
||||
_.each(users.filter(function (itm) {return !itm.view;}), function(item){
|
||||
if (usersSort.filter(function (itemFil) {return item.idOriginal === itemFil.idOriginal;}).length === 0) {
|
||||
len = users.filter(function (itemFil) {
|
||||
return (item.idOriginal === itemFil.idOriginal && !itemFil.view);
|
||||
}).length;
|
||||
usersSort.push({color: item.color, id: item.id, idOriginal: item.idOriginal, name: item.name, view: item.view, len: len})
|
||||
usersSort.push({color: item.color, id: item.id, idOriginal: item.idOriginal, name: item.name, view: item.view, len: len, initial: item.initial})
|
||||
}
|
||||
});
|
||||
var templateUserList = _.template(
|
||||
|
|
|
@ -152,7 +152,7 @@ define([
|
|||
textFinal: 'Final',
|
||||
textOriginal: 'Original',
|
||||
textChange: 'Review Change',
|
||||
textEditUsers: 'Edit Users'
|
||||
textEditUsers: 'Users'
|
||||
|
||||
}
|
||||
})(), DE.Views.Collaboration || {}))
|
||||
|
|
|
@ -6925,10 +6925,14 @@ html.pixel-ratio-3 .numbers li {
|
|||
margin-left: 4px;
|
||||
}
|
||||
#user-list .color {
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
border-radius: 50px;
|
||||
line-height: 40px;
|
||||
color: #6d6d72;
|
||||
font-weight: 500;
|
||||
}
|
||||
#user-list ul:before {
|
||||
content: none;
|
||||
|
|
|
@ -6696,17 +6696,15 @@ html.pixel-ratio-3 .numbers li {
|
|||
margin-left: 4px;
|
||||
}
|
||||
#user-list .color {
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
#user-list ul:after {
|
||||
content: none;
|
||||
text-align: center;
|
||||
border-radius: 50px;
|
||||
line-height: 40px;
|
||||
color: #6d6d72;
|
||||
font-weight: 400;
|
||||
}
|
||||
#user-list ul:before {
|
||||
content: none;
|
||||
}
|
||||
#user-list .item-inner:after {
|
||||
content: none;
|
||||
}
|
||||
|
|
|
@ -242,6 +242,8 @@ input, textarea {
|
|||
}
|
||||
|
||||
//Edit users
|
||||
@contentBlockColor: #6d6d72;
|
||||
|
||||
#user-list {
|
||||
.item-content {
|
||||
padding-left: 0;
|
||||
|
@ -254,10 +256,15 @@ input, textarea {
|
|||
margin-left: 4px;
|
||||
}
|
||||
.color {
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
border-radius: 50px;
|
||||
line-height: 40px;
|
||||
color: @contentBlockColor;
|
||||
font-weight: 500;
|
||||
|
||||
}
|
||||
ul:before {
|
||||
content: none;
|
||||
|
|
|
@ -229,6 +229,8 @@ input, textarea {
|
|||
}
|
||||
|
||||
//Edit users
|
||||
@contentBlockColor: #6d6d72;
|
||||
|
||||
#user-list {
|
||||
.item-content {
|
||||
padding-left: 0;
|
||||
|
@ -241,18 +243,16 @@ input, textarea {
|
|||
margin-left: 4px;
|
||||
}
|
||||
.color {
|
||||
min-width: 26px;
|
||||
min-height: 26px;
|
||||
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset;
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
ul:after {
|
||||
content: none;
|
||||
text-align: center;
|
||||
border-radius: 50px;
|
||||
line-height: 40px;
|
||||
color: @contentBlockColor;
|
||||
font-weight: 400;
|
||||
}
|
||||
ul:before {
|
||||
content: none;
|
||||
}
|
||||
.item-inner:after {
|
||||
content: none;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue