Skip to content

Commit

Permalink
Ensure that previous bg class on valueBox is cleared (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 29, 2017
1 parent cae0c06 commit 5bd738c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ flexdashboard 0.4 (unreleased)

- Fix problem w/ embedding source code for Rmd w/ spaces in path (#100)

- Ensure that previous bg class on valueBox is cleared (#106)


flexdashboard 0.3
-----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1718,11 +1718,11 @@ window.FlexDashboardComponents.push({
if (dataColor.indexOf('bg-') === 0) {
valueBox.css('background-color', '');
if (!valueBox.hasClass(dataColor)) {
valueBox.removeClass('bg-primary bg-info bg-warning bg-info bg-success');
valueBox.removeClass('bg-primary bg-info bg-warning bg-danger bg-success');
valueBox.addClass(dataColor);
}
} else {
valueBox.removeClass('bg-primary bg-info bg-warning bg-info bg-success');
valueBox.removeClass('bg-primary bg-info bg-warning bg-danger bg-success');
valueBox.css('background-color', dataColor);
}
}
Expand Down

0 comments on commit 5bd738c

Please sign in to comment.