Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ZeMKI
Mesort
Commits
22294c97
Commit
22294c97
authored
May 10, 2021
by
ZeMKI
Browse files
Update app.js
parent
ac7aae85
Changes
1
Hide whitespace changes
Inline
Side-by-side
resources/js/app.js
View file @
22294c97
...
...
@@ -305,12 +305,13 @@ window.app = new Vue({
'
There it was an error during the request - refresh page and try again
'
);
});
},
confirmduplicate
:
function
(
id
,
name
)
{
let
self
=
this
;
let
confirmDelete
=
this
.
$buefy
.
dialog
.
confirm
({
title
:
'
Confirm Duplicate
'
,
message
:
'
Do you want to duplicate the study "
'
+
title
:
self
.
trans
(
'
Confirm Duplicate
'
)
,
message
:
self
.
trans
(
'
Do you want to duplicate the study "
'
)
+
name
+
'
" ?
'
,
cancelText
:
'
Cancel
'
,
confirmText
:
'
Yes Duplicate Study
'
,
cancelText
:
self
.
trans
(
'
Cancel
'
)
,
confirmText
:
self
.
trans
(
'
Yes Duplicate Study
'
)
,
hasIcon
:
true
,
type
:
'
is-warning
'
,
onConfirm
:
()
=>
this
.
duplicatestudy
(
...
...
@@ -323,7 +324,7 @@ window.app = new Vue({
axios
.
get
(
'
studies/
'
+
id
+
'
/duplicate
'
).
then
((
response
)
=>
{
setTimeout
(
function
()
{
self
.
loading
=
false
;
self
.
$buefy
.
snackbar
.
open
(
'
Study duplicated
'
);
self
.
$buefy
.
snackbar
.
open
(
self
.
trans
(
'
Study duplicated
'
)
)
;
window
.
location
.
reload
();
},
500
);
...
...
@@ -334,13 +335,14 @@ window.app = new Vue({
'
There it was an error during the request - refresh page and try again
'
);
});
},
confirmdelete
:
function
(
id
,
name
)
{
let
self
=
this
;
let
confirmDelete
=
this
.
$buefy
.
dialog
.
confirm
({
title
:
'
Confirm Delete
'
,
message
:
this
.
trans
(
`<div class="bg-red-600 p-2 text-white text-center">You are about to delete the study
<br><span class="uppercase">`
+
message
:
`<div class="bg-red-600 p-2 text-white text-center">
`
+
this
.
self
(
'
You are about to delete the study
'
)
+
`
<br><span class="uppercase">`
+
name
+
'
</span><br>
and all its content?<br><span class="has-text-weight-bold">Continue?</span></div>
'
)
,
cancelText
:
this
.
trans
(
'
Cancel
'
),
confirmText
:
this
.
trans
(
'
YES
\n
Delete Study
'
),
`
</span><br>
`
+
self
.
self
(
'
and all its content?
'
)
+
`
<br><span class="has-text-weight-bold">
`
+
self
.
self
(
'
Continue?
'
)
+
`
</span></div>
`
,
cancelText
:
this
.
self
(
'
Cancel
'
),
confirmText
:
this
.
self
(
'
YES
\n
Delete Study
'
),
hasIcon
:
true
,
type
:
'
is-danger
'
,
onConfirm
:
()
=>
this
.
deletestudy
(
...
...
@@ -406,16 +408,17 @@ window.app = new Vue({
},
});
},
setinterviewdname
:
function
(
studyid
)
{
let
self
=
this
;
this
.
$buefy
.
dialog
.
prompt
({
message
:
this
.
trans
(
`What's the interviewee name?`
),
confirmText
:
this
.
trans
(
'
Start Interview
'
),
message
:
self
.
trans
(
`What's the interviewee name?`
),
confirmText
:
self
.
trans
(
'
Start Interview
'
),
inputAttrs
:
{
placeholder
:
''
,
maxlength
:
20
,
required
:
false
,
},
onConfirm
:
(
value
)
=>
{
this
.
interview
.
interviewed
=
value
;
self
.
interview
.
interviewed
=
value
;
window
.
location
.
href
=
'
interviews/new?study=
'
+
studyid
+
'
&interviewed=
'
+
value
;
...
...
Write
Preview
Supports
Markdown
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