### R code from vignette source 'vignettes/ReportingTools/inst/doc/shiny.Rnw'

###################################################
### code chunk number 1: shiny.Rnw:53-60
###################################################
custHeaderPanel = function(title, windowTitle =title, js= NULL, css=NULL)
{
  mytlist = c(lapply(js, function(x) tags$script(HTML(paste(readLines(x), collapse="\n")))),
              lapply(css, function(x) tags$style(HTML(paste(readLines(x), collapse="\n")))))
   tagList(tag("head",mytlist), div(class = "span12", 
                                                  style = "padding: 10px 0px;", h1(title)))
}


###################################################
### code chunk number 2: shiny.Rnw:65-71 (eval = FALSE)
###################################################
##     custHeaderPanel("ReportingTools", 
##                   js = list.files(system.file("extdata/jslib", package="ReportingTools"),
##                                   full.names=TRUE),
##                   css = list.files(system.file("extdata/csslib", package="ReportingTools"),
##                     pattern="bootstrap", full.names=TRUE),
##                   )


###################################################
### code chunk number 3: shiny.Rnw:80-84 (eval = FALSE)
###################################################
##    mainPanel(
##                verbatimTextOutput("summary"), 
##                htmlOutput("view2")
##                )


###################################################
### code chunk number 4: shiny.Rnw:93-95 (eval = FALSE)
###################################################
## myrep = HTMLReport(reportDirectory = "./",shortName="bigtest", 
##   handlers = shinyHandlers)


###################################################
### code chunk number 5: shiny.Rnw:102-109 (eval = FALSE)
###################################################
## renderRepTools = function(expr, env=parent.frame(), quoted=FALSE) {
##   func <- exprToFunction(expr, env, quoted)
##   
##   function(){
##     paste(capture.output(func()), collapse="\n")
##   }
## }


###################################################
### code chunk number 6: shiny.Rnw:116-119 (eval = FALSE)
###################################################
##  output$view2 <- renderRepTools({
##     publish(datasetInput(), myrep, name="view2tabdiv")
##   })


