Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CSIRO-INRA
landsepi
Commits
cf2707d0
Commit
cf2707d0
authored
Jul 02, 2021
by
Jean-Francois Rey
☕
Browse files
shiniy updateshinyalert message
parent
0b461820
Changes
2
Hide whitespace changes
Inline
Side-by-side
inst/shiny-landsepi/modules/editableDT.R
View file @
cf2707d0
...
...
@@ -227,10 +227,12 @@ editableDTServer <- function(id, DTdata, disableCol = shiny::reactiveVal(c()), c
shiny
::
observeEvent
(
input
$
deletePressed
,
{
id
<-
as.integer
(
sub
(
".*_([0-9]+)"
,
"\\1"
,
input
$
deletePressed
))
shinyalert
::
shinyalert
(
paste0
(
"!!! Remove line "
,
id
,
"!!!"
),
"Are you sure ?"
,
paste0
(
"-> Remove line "
,
id
,
" !"
),
paste0
(
"Values : "
,
paste
(
rv
$
data
[
id
,
-
ncol
(
rv
$
data
)],
collapse
=
" | "
),
"\n\nAre you sure ?"
),
type
=
"warning"
,
closeOnEsc
=
FALSE
,
showCancelButton
=
TRUE
,
size
=
"m"
,
callbackR
=
function
(
x
)
{
if
(
x
==
TRUE
)
{
rv
$
row
<-
id
...
...
inst/shiny-landsepi/server.R
View file @
cf2707d0
...
...
@@ -763,6 +763,8 @@ server <- function(input, output, session) {
shinyalert
::
shinyalert
(
"Oups! Something went wrong !"
,
"Please check inputs"
,
type
=
"error"
,
size
=
"m"
,
closeOnEsc
=
TRUE
,
showCancelButton
=
TRUE
,
showConfirmButton
=
FALSE
)
...
...
@@ -906,7 +908,6 @@ server <- function(input, output, session) {
}
else
{
croptypesTable
$
data
[,
"croptypeID"
]
<-
seq
(
1
:
nrow
(
croptypesTable
$
data
))
-1
print
(
croptypesTable
$
data
)
output
$
rotationText
<-
renderUI
({
HTML
(
setRotationText
(
croptypesTable
$
data
[,
2
]))})
simul_params
<<-
setCroptypes
(
simul_params
,
croptypesTable
$
data
[,
1
:
(
ncol
(
croptypesTable
$
data
)
-
2
)])
can_run_simul
$
croptypes
<<-
TRUE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment