-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathui.R
121 lines (109 loc) · 4.49 KB
/
ui.R
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
source("config.R") # global configuration
source("tooltips.R") # texts
source("ui_global.R")
source("util.R")
# Other parts of the UI
source("editor/ui.R")
source("explorer/ui.R")
source("result/ui.R")
## LOOK AT SHINY.OPTIONS
# customSlider javascript function for output threshold instead of index
JS.custom <-
"
// function to get custom values into a sliderInput
function customSlider (sliderId,values) {
$('#'+sliderId).data('ionRangeSlider').update({
'prettify': function (num) { return (values[num]); }
});
}"
# general handler function for scale sliders calling function customSlider
JS.scaleSliderHandler <- "
Shiny.addCustomMessageHandler('scaleSliderHandler',
function(data) {
//var name = data['name'];
//var values = data['values'];
customSlider(data['name'],data['values']);
}
);
"
# shiny ACE editor reloader
shinyAce_resize <- "
shinyjs.shinyAce_resize = function() {
//param = shinyjs.getParams(what);
ace.edit('model_input_area').resize();
ace.edit('prop_input_area').resize();
};
"
shinyUI(
fluidPage(
### Working solution for re-loading of fileInput
# tags$script('
# Shiny.addCustomMessageHandler("loader_reset", function(x) {
# var el = $("#" + x);
# el.replaceWith(el = el.clone(true));
# var id = "#" + x + "_progress";
# $(id).css("visibility", "hidden");
# });
# '),
useShinyjs(),
extendShinyjs(text = shinyAce_resize, functions = c("shinyAce_resize")),
# loading(file.path(mytempdir(), "image.Rmd")),
# fluidPage(
fluidRow(
column(8, titlePanel(Tool_name)),
# column(2, class = "advanced_checkbox",
# tooltip(tooltip = Editor_advancedSettings_tooltip,
# checkboxInput("advanced", Editor_advancedSettings_label, F)
# )
# ),
column(4,
a(img(src = "logo_new.png", height = 60, width = 165, style = "float:right"), href = "http://sybila.fi.muni.cz", target="_blank"),
a(img(src = "aec_badge_cav.svg", height = 60, width = 60, style = "float:right; padding: 5px 5px 5px 5px"),
href = "http://cavconference.org/2017/accepted-papers/", target="_blank"))
# )
),
tags$hr(),
fluidRow(
# Area prepared for Experiments management (Prev, Next, Save, Load, etc.)
# column(1,bsButton("btn_prev","Prev")),
# column(1,bsButton("btn_next","Next")),
# column(1,bsButton("btn_load","Load")),
# column(1,bsButton("btn_save","Save")),
# column(1,bsButton("btn_remove","Remove")),
# column(1,bsButton("btn_test_export","export")),
# column(1,bsButton("btn_test_import","import")),
column(2,
#"Select predefined example",
tooltip(tooltip = Editor_selectExample_tooltip,
selectInput("select_example", Editor_selectExample_label,
selected = "none",
choices = examples_list)),
offset = 0
),
column(1,
#style = "margin-top:5px;",
tooltip(tooltip = Editor_advancedSettings_tooltip,
checkboxInput("advanced", Editor_advancedSettings_label, F)),
offset = 0
),
column(7,
a(code("Click here for tutorial "), target = "_blank", href = "http://biodivine.fi.muni.cz/docs/pithya/tutorial.pdf"),
"or ",
a(code("here for complete manual"), target = "_blank", href = "http://biodivine.fi.muni.cz/docs/pithya/manual.pdf"),
"or ",
a(code("watch video slides on YouTube"), target = "_blank", href = "https://www.youtube.com/watch?v=xnLWmuvDBcI"),
offset = 1)
),
tabsetPanel(id = "dimensions",
editorTab(),
explorerTab(),
resultTab()
),
hr(),
em("If you find a bug or have a comment let us know, please, via an e-mail: "),
a("sybila-supp@fi.muni.cz", target = "_blank", href = "mailto:sybila-supp@fi.muni.cz"),
em(" or add an issue on "),
a("github", target = "_blank", href = "https://github.com/sybila/pithya-gui/issues"),
em(".")
)
)