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