зеркало из https://github.com/mozilla/treeherder.git
Bug 1367867 - Improve recognition of user Initial labels
This commit is contained in:
Родитель
e569dab54d
Коммит
c6dedb4af6
|
@ -220,16 +220,6 @@ a:visited {
|
||||||
content: none;
|
content: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-initials {
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 0.5em;
|
|
||||||
padding: 0.2em 0.3em;
|
|
||||||
width: 2.5em;
|
|
||||||
border: 1px solid #999999;
|
|
||||||
background-color: white;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label[href] {
|
.label[href] {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,10 +135,24 @@ fieldset[disabled] .btn-resultset:hover {
|
||||||
|
|
||||||
.revision-holder {
|
.revision-holder {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
padding-right: 11px;
|
padding-right: 6px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-push-icon {
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-push-initials {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 18px;
|
||||||
|
font-size: 8px;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-left: 3px;
|
||||||
|
color: gray;
|
||||||
|
}
|
||||||
|
|
||||||
.revision-comment {
|
.revision-comment {
|
||||||
color: #777;
|
color: #777;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,12 +99,15 @@ treeherder.filter('initials', function () {
|
||||||
var words = str.split(' ');
|
var words = str.split(' ');
|
||||||
var firstLetters = _.filter(_.map(words, function (word) { return word.replace(/[^A-Z]/gi, '')[0]; }));
|
var firstLetters = _.filter(_.map(words, function (word) { return word.replace(/[^A-Z]/gi, '')[0]; }));
|
||||||
var initials = "";
|
var initials = "";
|
||||||
|
|
||||||
if (firstLetters.length === 1) {
|
if (firstLetters.length === 1) {
|
||||||
initials = firstLetters[0];
|
initials = firstLetters[0];
|
||||||
} else if (firstLetters.length > 1) {
|
} else if (firstLetters.length > 1) {
|
||||||
initials = firstLetters[0] + firstLetters[firstLetters.length - 1];
|
initials = firstLetters[0] + firstLetters[firstLetters.length - 1];
|
||||||
}
|
}
|
||||||
return '<span class="label label-initials">' + initials + '</span>';
|
|
||||||
|
return '<span class="user-push-icon"><i class="fa fa-user-o" aria-hidden="true"></i></span>' +
|
||||||
|
'<div class="icon-superscript user-push-initials">' + initials + '</div>';
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче