-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
59 lines (54 loc) · 2.04 KB
/
server.R
File metadata and controls
59 lines (54 loc) · 2.04 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
shinyServer(function(input, output, session) {
# Navbar navigation -------------------------------------------------------
#WATCH BUTTONS, CHANGE TABS IF THE TAB PILL CLICKED IS NOT THAT OF THE CURRENT TAB.
observeEvent(input$switch_browse, {
if(input$theNavBar != "1") {
updateNavbarPage(session,
"theNavBar",
selected = "1")
}
#ADD AN ACTIVE CLASS TO THIS BUTTON AND REMOVE FROM ALL OTHERS.
shinyjs::removeCssClass(selector = ".navbuttons",
class = "navbuttons_active")
shinyjs::addCssClass(id = "switch_browse",
class = "navbuttons_active")
})
observeEvent(input$switch_leaderboard, {
if(input$theNavBar != "2") {
updateNavbarPage(session,
"theNavBar",
selected = "2")
}
shinyjs::removeCssClass(selector = ".navbuttons",
class = "navbuttons_active")
shinyjs::addCssClass(id = "switch_leaderboard",
class = "navbuttons_active")
})
observeEvent(input$switch_submissions, {
if(input$theNavBar != "3") {
updateNavbarPage(session,
"theNavBar",
selected = "3")
}
shinyjs::removeCssClass(selector = ".navbuttons",
class = "navbuttons_active")
shinyjs::addCssClass(id = "switch_submissions",
class = "navbuttons_active")
})
observeEvent(input$switch_records, {
if(input$theNavBar != "4") {
updateNavbarPage(session,
"theNavBar",
selected = "4")
}
shinyjs::removeCssClass(selector = ".navbuttons",
class = "navbuttons_active")
shinyjs::addCssClass(id = "switch_records",
class = "navbuttons_active")
})
# The tabs ---------------------------------------------------------
browseServer(input, output, session)
leaderboardServer(input, output, session)
submissionsServer_V2(input, output, session)
recordsServer(input, output, session)
}) #End Server Side