Skip to content

Commit

Permalink
make sure all apps using shinyjs work without requiring V8
Browse files Browse the repository at this point in the history
  • Loading branch information
daattali committed Jun 13, 2016
1 parent ce95f55 commit e0e59e1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions close-window/app.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
library(shinyjs)
jscode <- "shinyjs.closewindow = function() { window.close(); }"
jscode <- "shinyjs.closeWindow = function() { window.close(); }"

ui <- fluidPage(
useShinyjs(),
extendShinyjs(text = jscode),
extendShinyjs(text = jscode, functions = c("closeWindow")),
actionButton("close", "Close window")
)

server <- function(input, output, session) {
observeEvent(input$close, {
js$closewindow()
js$closeWindow()
stopApp()
})
}
Expand Down
2 changes: 1 addition & 1 deletion multiple-scrollspy-advanced/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ui <- navbarPage(
id = "navbar",
header = div(
useShinyjs(),
extendShinyjs("www/app-shinyjs.js"),
extendShinyjs("www/app-shinyjs.js", functions = c("updateScrollspy")),
includeCSS("www/app.css"),
includeScript("https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/1.4.3/jquery.scrollTo.min.js")
),
Expand Down
2 changes: 1 addition & 1 deletion multiple-scrollspy-basic/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ui <- navbarPage(

header = div(
useShinyjs(),
extendShinyjs("www/app-shinyjs.js"),
extendShinyjs("www/app-shinyjs.js", functions = c("updateScrollspy")),
includeCSS("www/app.css"),

# create a common scrollspy
Expand Down
2 changes: 1 addition & 1 deletion navigate-history/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ui <- navbarPage(
id = "navbar",
header = tagList(
useShinyjs(),
extendShinyjs("www/app-shinyjs.js")
extendShinyjs("www/app-shinyjs.js", functions = c("updateHistory"))
),

tabPanel("Home", value = "home",
Expand Down
2 changes: 1 addition & 1 deletion serve-images-files/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ shinyjs.navigate = function(url) {

ui <- fluidPage(
useShinyjs(),
extendShinyjs(text = jscode),
extendShinyjs(text = jscode, functions = c("navigate")),

# Portion of the app that lets the user cutomize a plot and then see
# a URL to serve that plot
Expand Down
2 changes: 1 addition & 1 deletion update-input/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source("update-input.R")

ui <- fluidPage(
useShinyjs(),
extendShinyjs("www/app-shinyjs.js"),
extendShinyjs("www/app-shinyjs.js", functions = c("getInputType")),

textInput("text", "Text input", "some text"),
selectInput("select", "Select input", LETTERS),
Expand Down

0 comments on commit e0e59e1

Please sign in to comment.