Commit b9a65556 authored by mmassaviol's avatar mmassaviol
Browse files

Close button for modal

parent b6f1ea4f
......@@ -610,7 +610,7 @@ generate_pages_server <- function() {
res <- res + '#\' Event when use RULEGRAPH button\n'
res <- res + 'observeEvent({c(input$sidebarmenu,input$refresh_rg)}, {\n\n'
res <- res + '\tif (input$sidebarmenu=="RULEGRAPH" & !dir.exists(input$results_dir)){\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = NULL))\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = tagList(actionButton("close_modal", "OK"))))\n'
res <- res + '\t}'
res <- res + '\telse{'
res <- res + '\t\tif (dir.exists(input$results_dir) & !dir.exists(paste0(input$results_dir,"/logs"))){\n'
......@@ -647,7 +647,7 @@ generate_pages_server <- function() {
res <- res + 'observeEvent({c(input$sidebarmenu,input$dry_run_button)}, {\n'
res <- res + '\n'
res <- res + '\tif (input$sidebarmenu=="RULEGRAPH" & !dir.exists(input$results_dir)){\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = NULL))\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = tagList(actionButton("close_modal", "OK"))))\n'
res <- res + '\t}'
res <- res + '\telse{'
res <- res + '\t\tif (dir.exists(input$results_dir) & !dir.exists(paste0(input$results_dir,"/logs"))){\n'
......@@ -673,7 +673,7 @@ generate_pages_server <- function() {
res <- res + '#\' Event when use '+ run$shiny_button$name +' button\n'
res <- res + 'observeEvent(input$'+run$shiny_button$name+', {\n\n'
res <- res + '\tif (!dir.exists(input$results_dir)){\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = NULL))\n'
res <- res + '\t\tshowModal(modalDialog(title = "Results directory error", "You need to choose a valid results directory",easyClose = TRUE,footer = tagList(actionButton("close_modal", "OK"))))\n'
res <- res + '\t}'
res <- res + '\telse{'
res <- res + '\t\trv$running = T\n'
......@@ -737,6 +737,7 @@ generate_pages_server <- function() {
res <- res + '\t\t\t\tsystem(paste0("touch ",input$results_dir,"/logs/workflow_end.error"),wait = T)\n'
res <- res + '\t\t\t\treturn(tags$p(paste0("error : ",w$message)))})\n'
res <- res + '\t\t\t}})\n\n'
res <- res + '\t\tobserveEvent(input$close_modal, {removeModal()})\n\n'
for(page in APP$pages){
for(box in page$boxes){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment