This repository was archived by the owner on Sep 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathserver.R
More file actions
38 lines (34 loc) · 1.35 KB
/
server.R
File metadata and controls
38 lines (34 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
app.server <- shinyServer(function(input, output) {
# Load helper
source('modules/modules.R', local = TRUE)
observe({
# Hide at start-up
if(length(input$searchResults_rows_selected) > 0){
if (finalSearchResultsDf$numParticipants[input$searchResults_rows_selected] == 0){
for(m in modules.hidden.tabs){
shinyjs::addClass(selector = paste(".navbar li a[data-value=", m, "]", sep=''), class = "disabledTab")
}
showNotification("The selected path is empty (no participants!); please, select another one", type="error")
} else{
for(m in modules.hidden.tabs){
shinyjs::removeClass(selector = paste(".navbar li a[data-value=", m, "]", sep=''), class = "disabledTab")
}
shinyjs::show("downloadOWL")
}
} else if (!is.null(input$owlFile)){
for(m in modules.hidden.tabs){
shinyjs::removeClass(selector = paste(".navbar li a[data-value=", m, "]", sep=''), class = "disabledTab")
}
} else{
for(m in modules.hidden.tabs){
shinyjs::addClass(selector = paste(".navbar li a[data-value=", m, "]", sep=''), class = "disabledTab")
}
shinyjs::hide("downloadOWL")
}
})
# Load modules
for(m in modules.tabs){
print(paste("Loading server module: ", m, sep=''))
source(paste("modules/", m, "/", m, ".R", sep=''), local = TRUE)
}
})