Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rstudio/shiny
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Chr96er/shiny
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 2, 2017

  1. Copy the full SHA
    2ce1bda View commit details
  2. Copy the full SHA
    0d51a11 View commit details
  3. Copy the full SHA
    6aab8fe View commit details
Showing with 9 additions and 5 deletions.
  1. +1 −1 DESCRIPTION
  2. +8 −3 R/input-file.R
  3. +0 −1 shiny.Rproj
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -89,9 +89,9 @@ Collate:
'stack.R'
'bookmark-state.R'
'bootstrap-layout.R'
'conditions.R'
'map.R'
'globals.R'
'conditions.R'
'utils.R'
'bootstrap.R'
'cache.R'
11 changes: 8 additions & 3 deletions R/input-file.R
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@
#' Internet Explorer 9 and earlier.}
#' @param accept A character vector of MIME types; gives the browser a hint of
#' what kind of files the server is expecting.
#' @param progressLabelAlignment A character vector of text alignments for
#' upload progress label. Defaults to "left".
#'
#' @examples
#' ## Only run examples in interactive R sessions
@@ -39,7 +41,8 @@
#' accept = c(
#' "text/csv",
#' "text/comma-separated-values,text/plain",
#' ".csv")
#' ".csv"),
#' progressLabelAlignment = "center"
#' ),
#' tags$hr(),
#' checkboxInput("header", "Header", TRUE)
@@ -70,9 +73,10 @@
#' }
#' @export
fileInput <- function(inputId, label, multiple = FALSE, accept = NULL,
width = NULL) {
width = NULL, progressLabelAlignment = c("left", "center", "right")) {

restoredValue <- restoreInput(id = inputId, default = NULL)
progressLabelAlignment <- progressLabelAlignment[1]

# Catch potential edge case - ensure that it's either NULL or a data frame.
if (!is.null(restoredValue) && !is.data.frame(restoredValue)) {
@@ -110,7 +114,8 @@ fileInput <- function(inputId, label, multiple = FALSE, accept = NULL,
)
),
tags$input(type = "text", class = "form-control",
placeholder = "No file selected", readonly = "readonly"
placeholder = "No file selected", readonly = "readonly",
style = paste0("text-align: ", progressLabelAlignment, ";)")
)
),

1 change: 0 additions & 1 deletion shiny.Rproj
Original file line number Diff line number Diff line change
@@ -19,4 +19,3 @@ BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --with-keep.source
PackageCheckArgs: --as-cran --no-manual --run-donttest
PackageRoxygenize: rd,collate,namespace