Skip to content

Commit f521c6f

Browse files
committed
update news + add wrench options
1 parent 6c26266 commit f521c6f

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ shinydashboard 0.5.1.9000
22
--------------------------------------------------------------------------------
33
* Updated to AdminLTE 2.3.2 (1ee281b).
44

5+
* Add wrench icon to the box-header (now can use dropdown menu)
6+
57
shinydashboard 0.5.1
68
--------------------------------------------------------------------------------
79

R/boxes.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ infoBox <- function(title, value = NULL, subtitle = NULL,
251251
#' @export
252252
box <- function(..., title = NULL, footer = NULL, status = NULL,
253253
solidHeader = FALSE, background = NULL, width = 6,
254-
height = NULL, collapsible = FALSE, collapsed = FALSE, wrench = FALSE) {
254+
height = NULL, collapsible = FALSE, collapsed = FALSE, wrench = FALSE, wrenchOptions = NULL) {
255255

256256
boxClass <- "box"
257257
if (solidHeader || !is.null(background)) {
@@ -299,11 +299,11 @@ box <- function(..., title = NULL, footer = NULL, status = NULL,
299299
collapseTag <- tags$button(class = paste0("btn btn-box-tool"), `data-widget` = "collapse", shiny::icon(collapseIcon))
300300
}
301301

302-
if(wrench == TRUE) {
302+
if (wrench == TRUE) {
303303
wrenchTag <- div(class = paste0("btn-group"),
304304
tags$button(class = "btn btn-box-tool dropdown-toggle", `type` = "button",
305305
`data-toggle` = "dropdown", shiny::icon("wrench")),
306-
tags$ul(class = "dropdown-menu", `role` = "menu")
306+
tags$ul(class = "dropdown-menu", `role` = "menu", wrenchOptions)
307307
## TODO: how to display them ?
308308
)
309309
}

R/deps.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ addDeps <- function(x) {
2020
}
2121

2222
dashboardDeps <- list(
23-
htmlDependency("AdminLTE", "2.0.6",
23+
htmlDependency("AdminLTE", "2.3.2",
2424
c(file = system.file("AdminLTE", package = "shinydashboard")),
2525
script = adminLTE_js,
2626
stylesheet = adminLTE_css

tests-manual/box.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body <- dashboardBody(
4242
)
4343
),
4444
box(title = "Histogram box title",
45-
status = "warning", solidHeader = TRUE, collapsible = F, wrench = T,
45+
status = "warning", solidHeader = TRUE, collapsible = F, wrench = T, wrenchOptions = tags$li(a(href="https://google.cz", "Click here!")),
4646
plotOutput("plot", height = 250)
4747
)
4848
),

0 commit comments

Comments
 (0)