fix paper colors
This commit is contained in:
parent
5e4f137dba
commit
294ed1838a
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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 + "" +
|
||||||
@ -23,7 +23,22 @@ function addPaper(title, status, comment, locked) {
|
|||||||
"comment": comment,
|
"comment": comment,
|
||||||
"locked": locked
|
"locked": locked
|
||||||
});
|
});
|
||||||
postToRest(urlPapers, paperData, function(data) {
|
postToRest(urlPapers, paperData, function (data) {
|
||||||
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 "";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user