Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Register
Sign in
Toggle navigation
Menu
Open sidebar
SondagesPro
QuestionSettingsType
questionExtraSurvey
Commits
24a35c38
Commit
24a35c38
authored
Sep 13, 2022
by
Chenu Denis
Browse files
[fix] Hide more Close button when uneeded
parent
9e5598cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
assets/questionExtraSurvey.js
View file @
24a35c38
/**
* @file questionExtraSurvey javascript system
* @author Denis Chenu
* @version 5.4.
1
* @version 5.4.
5
* @copyright Denis Chenu <http://www.sondages.pro>
* @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
*/
...
...
@@ -79,19 +79,13 @@ $(document).on("hide.bs.modal",'#modal-questionExtraSurvey',function(e) {
/* Unload iframe */
$
(
document
).
on
(
"
hide.bs.modal
"
,
'
#modal-questionExtraSurvey
'
,
function
(
e
)
{
/* Maybe remove ? */
try
{
document
.
getElementById
(
'
extra-survey-iframe
'
).
contentWindow
.
closeReloadAnyResponse
();
}
catch
(
exception
)
{
// Nothing to do : reloadAnyReponse are not up to date
}
$
(
"
#modal-questionExtraSurvey .frame-loaded
"
).
addClass
(
"
frame-loading
"
).
removeClass
(
"
frame-loaded
"
);
$
(
"
#modal-questionExtraSurvey .modal-footer .btn
"
).
addClass
(
"
btn-waiting
"
);
});
$
(
document
).
on
(
"
hidden.bs.modal
"
,
'
#modal-questionExtraSurvey
'
,
function
(
e
)
{
setTimeout
(()
=>
{
$
(
"
#modal-questionExtraSurvey iframe
"
).
attr
(
"
src
"
,
""
);
},
1500
);
$
(
"
#modal-questionExtraSurvey .frame-loaded
"
).
addClass
(
"
frame-loading
"
).
removeClass
(
"
frame-loaded
"
);
$
(
"
#modal-questionExtraSurvey .modal-footer .btn
"
).
addClass
(
"
btn-waiting
"
);
});
function
checkIsEmpty
(
element
,
srid
)
{
...
...
@@ -165,10 +159,10 @@ $(document).on('extrasurveyframe:on',function(event,data) {
$
(
document
).
on
(
'
extrasurveyframe:off
'
,
function
(
event
,
data
)
{
// Review : don't happen
$
(
"
#modal-questionExtraSurvey .modal-footer button[data-action]
"
).
each
(
function
(){
$
(
this
).
prop
(
'
disabled
'
,
true
);
});
$
(
"
#modal-questionExtraSurvey .modal-footer button
"
).
addClass
(
"
btn-waiting
"
);
});
$
(
document
).
on
(
'
extrasurveyframe:autoclose
'
,
function
(
event
,
data
)
{
$
(
"
#modal-questionExtraSurvey
"
).
modal
(
'
hide
'
);
...
...
@@ -195,6 +189,7 @@ $(document).on('click',"#modal-questionExtraSurvey button[data-action='delete']:
$
(
"
#modal-questionExtraSurvey iframe
"
).
contents
().
find
(
"
#limesurvey
"
).
append
(
"
<input type='hidden' name='confirm-clearall' value='confirm'>
"
);
$
(
"
#modal-questionExtraSurvey iframe
"
).
contents
().
find
(
"
#limesurvey
"
).
append
(
"
<input type='hidden' name='delete' value='delete'>
"
);
$
(
"
#modal-questionExtraSurvey iframe
"
).
contents
().
find
(
"
#limesurvey
"
).
submit
();
$
(
"
#modal-questionExtraSurvey .modal-footer .btn
"
).
addClass
(
"
btn-waiting
"
);
});
$
(
"
#modal-confirm-clearall-extrasurvey [data-dismiss]
"
).
on
(
'
click
'
,
function
(){
// LimeSurve 3.13 have an issue with dialog box not closed …
...
...
@@ -208,5 +203,6 @@ $(document).on('click',"#modal-questionExtraSurvey button[data-action='saveall-q
$
(
"
#extra-survey-iframe
"
).
contents
().
find
(
"
form#limesurvey
"
).
append
(
"
<input type='hidden' name='questionExtraSurveyQid' value='
"
+
questionExtraSurveyQid
+
"
'>
"
);
$
(
"
#extra-survey-iframe
"
).
contents
().
find
(
"
form#limesurvey
"
).
append
(
"
<input type='hidden' name='autosaveandquit' value=1>
"
);
$
(
"
#extra-survey-iframe
"
).
contents
().
find
(
"
form#limesurvey button:submit[value='saveall']
"
).
last
().
click
();
$
(
"
#modal-questionExtraSurvey .modal-footer .btn
"
).
addClass
(
"
btn-waiting
"
);
return
;
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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