Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: safetyGraphics
Title: Interactive Graphics for Monitoring Clinical Trial Safety
Version: 2.1.0
Version: 2.2.0
Authors@R: c(
person("Jeremy", "Wildfire", email = "jwildfire@gmail.com", role = c("cre","aut")),
person("Becca", "Krouse", role="aut"),
Expand Down
13 changes: 11 additions & 2 deletions R/mod_filterTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,27 @@ filterTab <- function(input, output, session, domainData, filterDomain, current_
)
}

n <- nrow(res_filter$filtered())
N <- nrow(raw())

shinyjs::html(
"header-count",
nrow(res_filter$filtered()),
n,
asis=TRUE
)

shinyjs::html(
"header-total",
nrow(raw()),
N,
asis=TRUE
)

# Emphasize population header when subset is applied.
shinyjs::toggleClass(
selector = "#population-header",
class = "subset",
condition = n < N
)
})

observe({
Expand Down
14 changes: 10 additions & 4 deletions R/mod_safetyGraphicsUI.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ safetyGraphicsUI <- function(id, meta, domainData, mapping, standards){

#script to append population badge nav bar
participant_badge<-tags$script(
HTML(
"var header = $('.navbar> .container-fluid');
header.append('<div id=\"population-header\" class=\"badge\" title=\"Selected Participants\" ><span id=\"header-count\"></span>/<span id=\"header-total\"></span></div>');"
)
HTML(paste0(
"var header = $('.navbar > .container-fluid');",
"header.append(\"",
"<div id='population-header' class='badge' title='Selected Participants'>",
"<span id='header-count'></span>",
"/",
"<span id='header-total'></span> participants",
"</div>",
"\");"
))
)
if(isNamespaceLoaded("shinybusy")){
spinner<-shinybusy::add_busy_spinner(spin = "atom", position="bottom-right")
Expand Down
4 changes: 4 additions & 0 deletions inst/www/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ table.metatable.dataTable tr > td:last-of-type, table.metatable.trdataTable tr >
margin-top:1em;
}

#population-header.subset {
background: blue;
}

#dataSettings-previews .nav-tabs{
margin-bottom: 1em;
}
Expand Down