Skip to content

Commit

Permalink
Add badge with issue count
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilyheart committed Dec 4, 2019
1 parent 0bf1bf4 commit e7e614b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<link rel="stylesheet" href="libraries/feedback.css?ver=2012">
<!-- Local -->
<link rel="stylesheet" href="libraries/selectize.bootstrap3.css?ver=v0.12.6">
<link rel="stylesheet" href="style/main.min.css?ver=0.2.7" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="style/main.min.css?ver=0.2.7b" media="screen" title="no title" charset="utf-8">

<!-- Scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -337,7 +337,7 @@ <h4 class="d-inline-flex">Warnings</h4>
<script type="text/javascript" src="libraries/selectize.min.js?ver=v0.12.6"></script>
<script type="text/javascript" src="libraries/defiant.min.js?ver=v2.2.6"></script>
<script type="text/javascript" src="scripts/projects.js?ver=0.2.7"></script>
<script type="text/javascript" src="scripts/issues.js?ver=0.2.7"></script>
<script type="text/javascript" src="scripts/issues.js?ver=0.2.7c"></script>
<script type="text/javascript" src="scripts/burndown.js?ver=0.2.7c"></script>
<script type="text/javascript" src="scripts/hours.js?ver=0.2.7"></script>
<script type="text/javascript" src="gitlab_servers.js?ver=0.2.7"></script>
Expand Down
9 changes: 7 additions & 2 deletions scripts/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ var issues = (function () {
// Set visuals
document.getElementById("error-counts").innerHTML = label;

if (errCount !== 0 && warnCount !== 0) {
label = errCount + "/" + warnCount;
} else {
label = issueErrorArr.length;
}
if (errCount > 0) {
document.getElementById("errors-tab").innerHTML = "Errors";
document.getElementById("errors-tab").innerHTML = "Errors <span class='badge badge-light'>" + label + "</span>";
document.getElementById("errors-tab").classList.add("error");
} else if (warnCount > 0) {
document.getElementById("errors-tab").innerHTML = "Warnings";
document.getElementById("errors-tab").innerHTML = "Warnings <span class='badge badge-light'>" + label + "</span>";
document.getElementById("errors-tab").classList.remove("error");
}

Expand Down
2 changes: 1 addition & 1 deletion style/main.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions style/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ a, a:hover {
.badge-primary {
background-color: $color-primary-0;
}
.badge-light {
background-color: $color-error-inverse;
color: $color-primary-4;
}

/* SELECT STUFFS */

Expand Down

0 comments on commit e7e614b

Please sign in to comment.