Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-poll
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
xblock-poll
Commits
9d95f256
Commit
9d95f256
authored
Sep 06, 2017
by
murad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Survey UI fixes for label
parent
d43543a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
poll/public/css/poll.css
+16
-1
poll/public/html/survey.html
+12
-12
No files found.
poll/public/css/poll.css
View file @
9d95f256
...
...
@@ -160,6 +160,15 @@ li.poll-result .poll-image {
border
:
0
;
}
.survey-table
td
{
text-align
:
center
;
}
.survey-table
td
label
{
display
:
block
;
padding
:
5px
0
;
}
.survey-table
td
,
.survey-table
th
{
border
:
1px
solid
#CCC
;
border-top
:
0
;
...
...
@@ -303,6 +312,9 @@ th.survey-answer {
visibility
:
hidden
;
}
.survey-table
.survey-option
.visible-mobile-only
{
width
:
calc
(
100%
-
20px
);
}
.survey-table
.survey-option
{
display
:
block
;
border
:
1px
solid
#ccc
;
...
...
@@ -326,7 +338,10 @@ th.survey-answer {
.survey-table
.survey-option
label
{
text-align
:
left
;
width
:
calc
(
100%
-
18px
);
padding
:
8px
0
;
}
.survey-table
tbody
tr
:last-child
td
{
border-bottom
:
1px
solid
#ccc
;
}
}
poll/public/html/survey.html
View file @
9d95f256
...
...
@@ -25,21 +25,21 @@
</th>
{% for answer, label in answers %}
<td
class=
"survey-option"
headers=
"poll-{{block_id}}-{{key}} poll-{{block_id}}-{{answer}}"
>
<input
type=
"radio"
name=
"{{key}}"
id=
"{{key}}-{{forloop.counter}}"
value=
"{{answer}}"
{%
if
question
.
choice =
=
answer
%}
checked
{%
endif
%}
{%
if
question
.
img_alt
%}
aria-label=
"{{question.img_alt}} {{label}}"
{%
else
%}
aria-label=
"{{question.label|striptags}} {{label}}"
{%
endif
%}
/>
{% with answer_count=forloop.counter %}
{% for answer, label in answers %}
{% if forloop.counter == answer_count %}
<label
class=
"visible-mobile-only"
for=
"{{key}}-{{answer_count}}"
>
{{label}}
<label
for=
"{{key}}-{{answer_count}}"
>
<input
type=
"radio"
name=
"{{key}}"
id=
"{{key}}-{{forloop.counter}}"
value=
"{{answer}}"
{%
if
question
.
choice =
=
answer
%}
checked
{%
endif
%}
{%
if
question
.
img_alt
%}
aria-label=
"{{question.img_alt}} {{label}}"
{%
else
%}
aria-label=
"{{question.label|striptags}} {{label}}"
{%
endif
%}
/>
<span
class=
"visible-mobile-only"
>
{{label}}
</span>
</label>
{% endif %}
{% endfor %}
...
...
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