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
0c4db58c
Commit
0c4db58c
authored
Dec 07, 2016
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TNL-6022] Added SR-only keyboard help button to the front of the problem.
parent
1f6e1892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
drag_and_drop_v2/public/js/drag_and_drop.js
+9
-1
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
0c4db58c
...
@@ -2,6 +2,9 @@ function DragAndDropTemplates(configuration) {
...
@@ -2,6 +2,9 @@ function DragAndDropTemplates(configuration) {
"use strict"
;
"use strict"
;
var
h
=
virtualDom
.
h
;
var
h
=
virtualDom
.
h
;
var
keyboardHelpButtonClass
=
"keyboard-help-button"
;
var
keyboardHelpText
=
gettext
(
'Keyboard Help'
);
var
itemSpinnerTemplate
=
function
(
item
)
{
var
itemSpinnerTemplate
=
function
(
item
)
{
if
(
!
item
.
xhr_active
)
{
if
(
!
item
.
xhr_active
)
{
return
null
;
return
null
;
...
@@ -380,7 +383,7 @@ function DragAndDropTemplates(configuration) {
...
@@ -380,7 +383,7 @@ function DragAndDropTemplates(configuration) {
}
}
return
(
return
(
h
(
"section.action-toolbar-item.sidebar-buttons"
,
{},
[
h
(
"section.action-toolbar-item.sidebar-buttons"
,
{},
[
sidebarButtonTemplate
(
"keyboard-help-button"
,
"fa-question"
,
gettext
(
'Keyboard Help'
)
),
sidebarButtonTemplate
(
keyboardHelpButtonClass
,
"fa-question"
,
keyboardHelpText
),
sidebarButtonTemplate
(
"reset-button"
,
"fa-refresh"
,
gettext
(
'Reset'
),
ctx
.
disable_reset_button
),
sidebarButtonTemplate
(
"reset-button"
,
"fa-refresh"
,
gettext
(
'Reset'
),
ctx
.
disable_reset_button
),
showAnswerButton
,
showAnswerButton
,
])
])
...
@@ -451,6 +454,10 @@ function DragAndDropTemplates(configuration) {
...
@@ -451,6 +454,10 @@ function DragAndDropTemplates(configuration) {
)
)
};
};
var
forwardKeyboardHelpButtonTemplate
=
function
(
ctx
)
{
return
h
(
"button"
,
{
attributes
:
{
tabindex
:
0
},
className
:
keyboardHelpButtonClass
},
keyboardHelpText
);
};
var
progressTemplate
=
function
(
ctx
)
{
var
progressTemplate
=
function
(
ctx
)
{
// Formats a number to 4 decimals without trailing zeros
// Formats a number to 4 decimals without trailing zeros
// (1.00 -> '1'; 1.50 -> '1.5'; 1.333333333 -> '1.3333').
// (1.00 -> '1'; 1.50 -> '1.5'; 1.333333333 -> '1.3333').
...
@@ -531,6 +538,7 @@ function DragAndDropTemplates(configuration) {
...
@@ -531,6 +538,7 @@ function DragAndDropTemplates(configuration) {
problemHeader
,
problemHeader
,
h
(
'p'
,
{
innerHTML
:
ctx
.
problem_html
}),
h
(
'p'
,
{
innerHTML
:
ctx
.
problem_html
}),
]),
]),
h
(
'div'
,
{
'className'
:
'sr'
},
[
forwardKeyboardHelpButtonTemplate
(
ctx
)]),
h
(
'section.drag-container'
,
{},
[
h
(
'section.drag-container'
,
{},
[
h
(
'div.item-bank'
,
item_bank_properties
,
[
h
(
'div.item-bank'
,
item_bank_properties
,
[
h
(
'p'
,
{
className
:
'zone-description sr'
},
gettext
(
'Item Bank'
)),
h
(
'p'
,
{
className
:
'zone-description sr'
},
gettext
(
'Item Bank'
)),
...
...
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