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;
}
.text-draft {
color: rgba(0, 0, 0, 0.48) !important;
}
.text-primary {
color: #fed136 !important;
}

View File

@ -6,7 +6,7 @@ function showPapers(papersElement) {
$(papersElement).parent().append("<div class='row text-left'>" +
" <div class='col-md-12'>" +
" <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>" +
" </span>" +
" <a href='paper.html?id=" + paper.id + "" +
@ -23,7 +23,22 @@ function addPaper(title, status, comment, locked) {
"comment": comment,
"locked": locked
});
postToRest(urlPapers, paperData, function(data) {
postToRest(urlPapers, paperData, function (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 "";
}
}