Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-activetable
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-activetable
Commits
43193a7d
Commit
43193a7d
authored
Oct 20, 2015
by
Sven Marnach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply a bunch of style fixes.
parent
43b1a871
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
activetable/activetable.py
+5
-0
activetable/static/css/activetable.css
+19
-0
activetable/templates/html/activetable.html
+2
-2
No files found.
activetable/activetable.py
View file @
43193a7d
...
@@ -97,11 +97,16 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
...
@@ -97,11 +97,16 @@ class ActiveTableXBlock(StudioEditableXBlockMixin, XBlock):
self
.
response_cells
=
{}
self
.
response_cells
=
{}
for
row
,
height
in
zip
(
self
.
tbody
,
self
.
_row_heights
[
1
:]):
for
row
,
height
in
zip
(
self
.
tbody
,
self
.
_row_heights
[
1
:]):
row
[
'height'
]
=
height
row
[
'height'
]
=
height
if
row
[
'index'
]
&
1
:
row
[
'class'
]
=
'even'
else
:
row
[
'class'
]
=
'odd'
for
cell
in
row
[
'cells'
]:
for
cell
in
row
[
'cells'
]:
cell
.
id
=
'cell_{}_{}'
.
format
(
cell
.
index
,
row
[
'index'
])
cell
.
id
=
'cell_{}_{}'
.
format
(
cell
.
index
,
row
[
'index'
])
if
not
cell
.
is_static
:
if
not
cell
.
is_static
:
self
.
response_cells
[
cell
.
id
]
=
cell
self
.
response_cells
[
cell
.
id
]
=
cell
cell
.
value
=
self
.
answers
.
get
(
cell
.
id
)
cell
.
value
=
self
.
answers
.
get
(
cell
.
id
)
cell
.
height
=
height
-
2
if
isinstance
(
cell
,
NumericCell
)
and
cell
.
abs_tolerance
is
None
:
if
isinstance
(
cell
,
NumericCell
)
and
cell
.
abs_tolerance
is
None
:
cell
.
set_tolerance
(
self
.
default_tolerance
)
cell
.
set_tolerance
(
self
.
default_tolerance
)
if
cell
.
value
is
None
:
if
cell
.
value
is
None
:
...
...
activetable/static/css/activetable.css
View file @
43193a7d
...
@@ -17,10 +17,12 @@
...
@@ -17,10 +17,12 @@
line-height
:
1.5em
;
line-height
:
1.5em
;
padding
:
0
10px
;
padding
:
0
10px
;
border
:
1px
solid
#c0c0c0
;
border
:
1px
solid
#c0c0c0
;
vertical-align
:
middle
;
}
}
.activetable_block
th
{
.activetable_block
th
{
text-align
:
left
;
text-align
:
left
;
text-shadow
:
0
1px
0
#ffffff
;
text-shadow
:
0
1px
0
#ffffff
;
font-weight
:
bold
;
}
}
/* cells that allow user input */
/* cells that allow user input */
.activetable_block
td
.active
{
.activetable_block
td
.active
{
...
@@ -57,6 +59,9 @@
...
@@ -57,6 +59,9 @@
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
background-color
:
transparent
;
background-color
:
transparent
;
border-radius
:
initial
;
background-image
:
initial
;
box-shadow
:
initial
;
}
}
.activetable_block
input
[
type
=
"text"
]
:hover
{
.activetable_block
input
[
type
=
"text"
]
:hover
{
outline
:
3px
solid
#a0a0ff
;
outline
:
3px
solid
#a0a0ff
;
...
@@ -80,3 +85,17 @@
...
@@ -80,3 +85,17 @@
.activetable_block
#activetable-help-button
:hover
{
.activetable_block
#activetable-help-button
:hover
{
color
:
#bd9730
;
color
:
#bd9730
;
}
}
.activetable_block
.status
,
.activetable_block
.status-message
{
margin
:
2em
0
;
}
.activetable_block
.status
{
display
:
inline-block
;
width
:
20px
;
height
:
20px
;
background
:
url("/static/images/unanswered-icon.png")
center
no-repeat
;
}
.activetable_block
.action
.check
{
height
:
40px
;
font-weight
:
600
;
text-transform
:
uppercase
;
}
activetable/templates/html/activetable.html
View file @
43193a7d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</thead>
</thead>
<tbody>
<tbody>
{% for row in tbody %}
{% for row in tbody %}
<tr
style=
"height: {{ row.height }}px;"
>
<tr
class=
"{{ row.class }}"
style=
"height: {{ row.height }}px;"
>
{% for cell in row.cells %}
{% for cell in row.cells %}
<td
class=
"{{ cell.classes }}"
id=
"{{ cell.id }}"
>
<td
class=
"{{ cell.classes }}"
id=
"{{ cell.id }}"
>
{% if cell.is_static %}
{% if cell.is_static %}
...
@@ -38,6 +38,6 @@
...
@@ -38,6 +38,6 @@
<div
class=
"status"
></div>
<div
class=
"status"
></div>
<div
class=
"status-message"
></div>
<div
class=
"status-message"
></div>
<div
class=
"action"
>
<div
class=
"action"
>
<button
class=
"check
Check"
><span
class=
"sr"
>
your answer
</span><span
class=
"check-label"
>
Check
</span></button>
<button
class=
"check
"
><span
class=
"check-label"
>
Check
</span><span
class=
"sr"
>
your answer
</span></button>
</div>
</div>
</div>
</div>
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