Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kiwi theme for limesurvey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mathieu Loiseau
kiwi theme for limesurvey
Commits
30373072
Commit
30373072
authored
3 years ago
by
Mathieu Loiseau
Browse files
Options
Downloads
Patches
Plain Diff
Verrouillage du questionnaire avec la classe .fin
parent
788faaf4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
css/custom.css
+66
-16
66 additions, 16 deletions
css/custom.css
css/jkeyboard.css
+15
-5
15 additions, 5 deletions
css/jkeyboard.css
scripts/custom.js
+36
-1
36 additions, 1 deletion
scripts/custom.js
with
117 additions
and
22 deletions
css/custom.css
+
66
−
16
View file @
30373072
...
...
@@ -7,36 +7,86 @@
Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
*/
.fruity
.question-container
.btn-primary
{
background-color
:
rgba
(
255
,
255
,
255
,
0.55
);
border
:
1px
solid
white
;
background-color
:
rgba
(
255
,
255
,
255
,
1
);
border
:
2px
solid
white
;
padding
:
20px
;
border-radius
:
25px
;
color
:
black
;
font-size
:
30px
;
font-weight
:
bold
;
}
.fruity
.question-container
.btn-primary
:hover
,
.fruity
.btn-primary
:focus
,
.fruity
.btn-primary
:active
,
.fruity
.btn-primary.active
,
.fruity
.btn-primary.active
:focus
,
.fruity
.open
.dropdown-toggle.btn-primary
{
background-color
:
white
;
border
:
1px
solid
white
;
.fruity
.btn-primary
:hover
,
.fruity
.btn-primary
:focus
{
background-color
:
rgba
(
175
,
175
,
175
,
1
);
border
:
2px
solid
#222222
;
color
:
black
;
}
.item0
,
.item5
,
.item10
,
.item15
,
.item20
{
background-image
:
url(/upload/themes/survey/kiwi/files/bg/item0.svg)
;
.fruity
.btn-primary
:active
,
.fruity
.btn-primary.active
,
.fruity
.btn-primary.active
:focus
,
.fruity
.open
.dropdown-toggle.btn-primary
{
background-color
:
rgba
(
0
,
0
,
0
,
0.98
);
border
:
2px
solid
white
;
color
:
white
;
}
.item1
,
.item6
,
.item11
,
.item16
,
.item21
{
background-image
:
url(/upload/themes/survey/kiwi/files/bg/item1.svg)
;
.item0
,
.item5
,
.item10
,
.item15
,
.item20
,
.item25
{
background-color
:
#6600cc
;
}
.item1
,
.item6
,
.item11
,
.item16
,
.item21
,
.item26
{
background-color
:
#cc3300
;
}
.item2
,
.item7
,
.item12
,
.item17
,
.item22
,
.item27
{
background-color
:
#ff9900
;
}
.item3
,
.item8
,
.item13
,
.item18
,
.item23
,
.item28
{
background-color
:
#ffff33
;
}
.item4
,
.item9
,
.item14
,
.item19
,
.item24
,
.item29
{
background-color
:
#0066ff
;
}
.itemE
{
background-color
:
black
;
background-image
:
url(/upload/themes/survey/fruity_for_ecrimo/files/bg/itemE.svg)
;
}
.item0
,
.item6
,
.item12
,
.item18
,
.item24
{
background-image
:
url(/upload/themes/survey/fruity_for_ecrimo/files/bg/item0.svg)
;
}
.item1
,
.item7
,
.item13
,
.item19
,
.item25
{
background-image
:
url(/upload/themes/survey/fruity_for_ecrimo/files/bg/item1.svg)
;
}
.item2
,
.item8
,
.item14
,
.item20
,
.item26
{
background-image
:
url(/upload/themes/survey/fruity_for_ecrimo/files/bg/item2.svg)
;
}
.item
2
,
.item
7
,
.item1
2
,
.item1
7
,
.item2
2
{
background-image
:
url(/upload/themes/survey/
kiwi
/files/bg/item
2
.svg)
;
.item
3
,
.item
9
,
.item1
5
,
.item
2
1
,
.item2
7
{
background-image
:
url(/upload/themes/survey/
fruity_for_ecrimo
/files/bg/item
3
.svg)
;
}
.item
3
,
.item
8
,
.item1
3
,
.item
18
,
.item2
3
{
background-image
:
url(/upload/themes/survey/
kiwi
/files/bg/item
3
.svg)
;
.item
4
,
.item
10
,
.item1
6
,
.item
22
,
.item2
8
{
background-image
:
url(/upload/themes/survey/
fruity_for_ecrimo
/files/bg/item
4
.svg)
;
}
.item
4
,
.item
9
,
.item1
4
,
.item
19
,
.item2
4
{
background-image
:
url(/upload/themes/survey/
kiwi
/files/bg/item
4
.svg)
;
.item
5
,
.item
11
,
.item1
7
,
.item
23
,
.item2
9
{
background-image
:
url(/upload/themes/survey/
fruity_for_ecrimo
/files/bg/item
5
.svg)
;
}
.asterisk.pull-left
{
display
:
none
;
}
.ecrire
.clavier
{
display
:
none
;}
/*Pour gérer la fin du questionnaire (le bouton suivant/valider est caché en haut à gauche, mettre la classe fin à un élément*/
#ls-button-submit
.fin
{
color
:
white
;
background-color
:
rgba
(
255
,
255
,
255
,
0.01
);
border
:
none
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
css/jkeyboard.css
+
15
−
5
View file @
30373072
.ecrire
.clavier
{
display
:
none
;}
.jkeyboard-answer
{
font-size
:
38px
;
height
:
58px
;
padding
:
10px
;
font-weight
:
bold
;
}
.jkeyboard
{
display
:
inline-block
;
background-color
:
none
;
...
...
@@ -13,13 +22,14 @@
}
.jkeyboard
.jline
ul
li
{
font-family
:
arial
,
sans-serif
;
font-size
:
20px
;
font-size
:
33px
;
font-weight
:
bold
;
background-color
:
#328637
;
display
:
inline-block
;
border
:
1px
solid
#0f3e12
;
box-shadow
:
0
0
3px
#0f3e12
;
box-shadow
:
inset
0
0
3px
#0f3e12
;
margin
:
1
0
px
0
1px
1
4px
;
margin
:
1
8
px
0
1px
4
8
px
;
color
:
#f7faf7
;
border-radius
:
5px
;
width
:
52px
;
...
...
@@ -48,21 +58,21 @@
}
.jkeyboard
.jline
.layout_switch
{
background-color
:
#328637
;
background-image
:
url("/upload/themes/survey/
kiwi
/files/kb/locale.png")
;
background-image
:
url("/upload/themes/survey/
fruity_for_ecrimo
/files/kb/locale.png")
;
background-repeat
:
no-repeat
;
background-position
:
center
,
right
;
}
.jkeyboard
.jline
.shift
{
width
:
100px
;
background-color
:
#328637
;
background-image
:
url("/upload/themes/survey/
kiwi
/files/kb/shift.png")
;
background-image
:
url("/upload/themes/survey/
fruity_for_ecrimo
/files/kb/shift.png")
;
background-repeat
:
no-repeat
;
background-position
:
center
,
center
;
}
.jkeyboard
.jline
.backspace
{
width
:
69px
;
background-color
:
#328637
;
background-image
:
url("/upload/themes/survey/
kiwi
/files/kb/backspace.png")
;
background-image
:
url("/upload/themes/survey/
fruity_for_ecrimo
/files/kb/backspace.png")
;
background-repeat
:
no-repeat
;
background-position
:
center
,
center
;
}
This diff is collapsed.
Click to expand it.
scripts/custom.js
+
36
−
1
View file @
30373072
...
...
@@ -6,6 +6,7 @@
If possible use a closure, or add them to the general Template Object "Template"
*/
var
cheat
=
5
;
$
(
document
).
on
(
'
ready pjax:scriptcomplete
'
,
function
(){
/**
...
...
@@ -13,6 +14,7 @@ $(document).on('ready pjax:scriptcomplete',function(){
* @see https://learn.jquery.com/using-jquery-core/document-ready/
*/
handleExtrakeyboard
();
handleEnd
();
});
function
handleExtrakeyboard
(){
...
...
@@ -24,7 +26,7 @@ function handleExtrakeyboard(){
input
=
$
(
inputs
[
i
])
layout
=
$
(
layouts
[
i
])
layout
=
createLayout
(
input
,
layout
.
text
(),
i
);
createKeyboard
(
input
,
layout
,
i
)
;
createKeyboard
(
input
,
layout
,
i
)
;
}
}
else
if
(
inputs
.
length
>
0
){
...
...
@@ -78,6 +80,39 @@ function createLayout(i, l, n){
function
createKeyboard
(
input
,
layout
,
n
){
elt
=
$
(
"
<div id='kb
"
+
n
+
"
'></div>
"
);
elt
.
appendTo
(
input
.
parent
());
input
.
addClass
(
"
jkeyboard-answer
"
);
$
(
'
#kb
'
+
n
).
jkeyboard
(
layout
);
input
.
attr
(
'
readonly
'
,
'
readonly
'
);
}
function
cheatCode
(){
cheat
--
;
elt
=
$
(
"
<p>
"
+
cheat
+
"
</p>
"
);
$
(
'
.fin
'
).
append
(
elt
);
setTimeout
(
function
(){
elt
.
remove
();
if
(
cheat
===
0
){
code
=
prompt
(
'
Entrer le code de déverouillage :
'
);
if
(
code
==
$
(
"
[code]
"
)[
0
].
getAttribute
(
'
code
'
)){
$
(
'
#ls-button-submit
'
).
prop
(
'
disabled
'
,
false
);
}
else
{
cheat
=
5
;
}
}
},
100
);
}
function
handleEnd
(){
if
(
testEnd
()){
submit
=
$
(
'
#ls-button-submit
'
);
submit
.
prop
(
'
disabled
'
,
true
);
$
(
"
.fin
"
).
click
(
cheatCode
);
}
}
function
testEnd
(){
elt
=
$
(
"
.fin
"
);
return
elt
.
length
>
0
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment