Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
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
OpenEdx
xblock-drag-and-drop-v2
Commits
994cb556
Commit
994cb556
authored
Jan 06, 2016
by
Tim Krones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keyboard accessibility for resetting exercise.
parent
6ab95917
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
drag_and_drop_v2/public/js/drag_and_drop.js
+7
-1
drag_and_drop_v2/public/js/view.js
+7
-4
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
994cb556
...
...
@@ -61,6 +61,11 @@ function DragAndDropBlock(runtime, element, configuration) {
}
});
$element
.
on
(
'click'
,
'.reset-button'
,
resetExercise
);
$element
.
on
(
'keydown'
,
'.reset-button'
,
function
(
evt
)
{
if
(
evt
.
which
===
RET
)
{
resetExercise
(
evt
);
}
});
$element
.
on
(
'click'
,
'.submit-input'
,
submitInput
);
// Indicate that exercise is done loading
...
...
@@ -483,7 +488,8 @@ function DragAndDropBlock(runtime, element, configuration) {
applyState
();
};
var
resetExercise
=
function
()
{
var
resetExercise
=
function
(
evt
)
{
evt
.
preventDefault
();
$
.
ajax
({
type
:
'POST'
,
url
:
runtime
.
handlerUrl
(
element
,
'reset'
),
...
...
drag_and_drop_v2/public/js/view.js
View file @
994cb556
...
...
@@ -147,10 +147,13 @@
var
properties
=
{
attributes
:
{
'aria-live'
:
'polite'
}
};
return
(
h
(
'section.feedback'
,
properties
,
[
h
(
'div.reset-button'
,
{
style
:
{
display
:
reset_button_display
}},
gettext
(
'Reset exercise'
)),
h
(
'h3.title1'
,
{
style
:
{
display
:
feedback_display
}},
gettext
(
'Feedback'
)),
h
(
'p.message'
,
{
style
:
{
display
:
feedback_display
},
innerHTML
:
ctx
.
feedback_html
})
h
(
'a.reset-button'
,
{
style
:
{
display
:
reset_button_display
},
attributes
:
{
tabindex
:
0
}},
gettext
(
'Reset exercise'
)
),
h
(
'h3.title1'
,
{
style
:
{
display
:
feedback_display
}
},
gettext
(
'Feedback'
)),
h
(
'p.message'
,
{
style
:
{
display
:
feedback_display
},
innerHTML
:
ctx
.
feedback_html
})
])
);
};
...
...
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