fix paper colors

This commit is contained in:
Anton Romanov 2018-09-05 13:45:20 +04:00
parent 5e4f137dba
commit 294ed1838a
2 changed files with 21 additions and 2 deletions

View File

@ -15,6 +15,10 @@ a:hover {
color: #fec503; color: #fec503;
} }
.text-draft {
color: rgba(0, 0, 0, 0.48) !important;
}
.text-primary { .text-primary {
color: #fed136 !important; color: #fed136 !important;
} }

View File

@ -6,7 +6,7 @@ function showPapers(papersElement) {
$(papersElement).parent().append("<div class='row text-left'>" + $(papersElement).parent().append("<div class='row text-left'>" +
" <div class='col-md-12'>" + " <div class='col-md-12'>" +
" <span class='fa-stack fa-1x'>\n" + " <span class='fa-stack fa-1x'>\n" +
" <i class='fa fa-circle fa-stack-2x text-warning'></i>" + " <i class='fa fa-circle fa-stack-2x " + getPaperStatusClass(paper.status) + "'></i>" +
" <i class='fa fa-file-text-o fa-stack-1x fa-inverse'></i>" + " <i class='fa fa-file-text-o fa-stack-1x fa-inverse'></i>" +
" </span>" + " </span>" +
" <a href='paper.html?id=" + paper.id + "" + " <a href='paper.html?id=" + paper.id + "" +
@ -27,3 +27,18 @@ function addPaper(title, status, comment, locked) {
alert(data); alert(data);
}); });
} }
function getPaperStatusClass(status) {
switch (status) {
case 'DRAFT':
return "text-draft"
case 'ON_PREPARATION':
return "text-primary";
case 'COMPLETED':
return "text-success";
case 'ATTENTION':
return "text-warning";
default:
return "";
}
}